vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Another SQL error... (https://vborg.vbsupport.ru/showthread.php?t=60904)

razorownz 01-29-2004 04:51 AM

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 ?

Zachery 01-29-2004 04:55 AM

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

razorownz 01-29-2004 05:09 AM

i dont have any mods

g-force2k2 01-29-2004 08:13 AM

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

razorownz 01-29-2004 09:19 AM

okay and if it doesnt exist, where do i put it?

razorownz 01-29-2004 09:19 AM

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

g-force2k2 01-29-2004 04:04 PM

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

razorownz 01-29-2004 04:28 PM

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


All times are GMT. The time now is 02:10 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.01065 seconds
  • Memory Usage 1,730KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete