Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 01-29-2004, 04:51 AM
razorownz razorownz is offline
 
Join Date: Jun 2003
Location: Sweden
Posts: 47
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Another SQL error...

Database error in vBulletin 2.3.4:

Invalid SQL: SELECT * FROM moderator WHERE userid= AND canviewprofile=1
mysql error: You have an error in your SQL syntax near 'AND canviewprofile=1' at line 1

mysql error number: 1064

Date: Wednesday 28th of January 2004 10:57:12 PM
Script: http://www.worldofcars.nu/forum/foru...ions&userid=25
Referer:

I dont know where its appearing since I recieved it in email as a report. Does any1 know ?
Reply With Quote
  #2  
Old 01-29-2004, 04:55 AM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by razorownz
Database error in vBulletin 2.3.4:

Invalid SQL: SELECT * FROM moderator WHERE userid= AND canviewprofile=1
mysql error: You have an error in your SQL syntax near 'AND canviewprofile=1' at line 1

mysql error number: 1064

Date: Wednesday 28th of January 2004 10:57:12 PM
Script: http://www.worldofcars.nu/forum/foru...ions&userid=25
Referer:

I dont know where its appearing since I recieved it in email as a report. Does any1 know ?
it was generated by one of your moderators id guess
Reply With Quote
  #3  
Old 01-29-2004, 05:09 AM
razorownz razorownz is offline
 
Join Date: Jun 2003
Location: Sweden
Posts: 47
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i dont have any mods
Reply With Quote
  #4  
Old 01-29-2004, 08:13 AM
g-force2k2 g-force2k2 is offline
 
Join Date: Mar 2002
Location: Everywhere you wanna be..
Posts: 1,608
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

razorownz,

open moderator.php

And make sure that this code exists in the moderator.php file

PHP Code:
WHERE userid=$bbuserinfo[userid] AND canviewprofile=
Because thats the line of coding thats not working or has been altered. The $bbuserinfo[userid] should produce an idea, but in the error it is not, this could also exist because perhaps and unauthorized user is accessing this page.

Regards,
g-force2k2
Reply With Quote
  #5  
Old 01-29-2004, 09:19 AM
razorownz razorownz is offline
 
Join Date: Jun 2003
Location: Sweden
Posts: 47
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

okay and if it doesnt exist, where do i put it?
Reply With Quote
  #6  
Old 01-29-2004, 09:19 AM
razorownz razorownz is offline
 
Join Date: Jun 2003
Location: Sweden
Posts: 47
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

that line looks like this:

} elseif ($permissions[ismoderator] or $ismod=$DB_site->query_first("SELECT * FROM moderator WHERE userid=$bbuserinfo[userid] AND canviewprofile=1")) {

which exists in the moderator.php file
Reply With Quote
  #7  
Old 01-29-2004, 04:04 PM
g-force2k2 g-force2k2 is offline
 
Join Date: Mar 2002
Location: Everywhere you wanna be..
Posts: 1,608
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

razorownz,

that is the correct problem, perhaps one way to fix this problem would be to add:

PHP Code:
if ( !$bbuserinfo['userid'] ) :
      
show_nopermission (  ) ;
endif ; 
after:

PHP Code:
require ( './global.php' ) ; 
Hopefully that will solve your problem.

Cheers,
g-force2k2
Reply With Quote
  #8  
Old 01-29-2004, 04:28 PM
razorownz razorownz is offline
 
Join Date: Jun 2003
Location: Sweden
Posts: 47
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ive uploaded the new moderator.php with the stated changes, we'll see if any more errors occur... thanks once again
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:43 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03712 seconds
  • Memory Usage 2,228KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (3)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (8)postbit
  • (8)postbit_onlinestatus
  • (8)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete