vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Help me : Database error (https://vborg.vbsupport.ru/showthread.php?t=295075)

pdiscus 02-13-2013 11:27 AM

Help me : Database error
 
1 Attachment(s)
Hi
I constantly get emails sent to my email database error

Code:

Database error in vBulletin 4.2.0:

Invalid SQL:

            SELECT thread.threadid, thread.title, thread.lastpost, thread.forumid, thread.replycount, thread.postusername, thread.postuserid, thread.lastposter, thread.lastposterid, thread.dateline, thread.views, thread.visible, thread.open, user.usergroupid, user.displaygroupid
            FROM thread AS thread
            LEFT JOIN user AS user ON (user.userid = thread.lastposterid)
            WHERE NOT ISNULL(thread.threadid) AND thread.visible = '1' AND thread.open!='10'  AND thread.forumid NOT IN(3,1,2,282,272,243,245,244,508,296,573,)
            ORDER BY lastpost DESC
            LIMIT 0, 10;

MySQL Error  : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')
            ORDER BY lastpost DESC
            LIMIT 0, 10' at line 4
Error Number  : 1064
Request Date  : Wednesday, February 13th 2013 @ 07:16:52 AM
Error Date    : Wednesday, February 13th 2013 @ 07:16:52 AM
Script        : http://p30pji.ir/forumdisplay.php?f=70
Referrer      :
IP Address    : 178.252.189.217
Username      : ثبت نام نشده
Classname    : vB_Database
MySQL Version :


Thank you

LifesGreatestGift 02-13-2013 03:24 PM

is this a custom script or the default vbulletin?

squidsk 02-13-2013 04:48 PM

Quote:

Originally Posted by pdiscus (Post 2403964)
Hi
I constantly get emails sent to my email database error

Code:

Database error in vBulletin 4.2.0:

Invalid SQL:

            SELECT thread.threadid, thread.title, thread.lastpost, thread.forumid, thread.replycount, thread.postusername, thread.postuserid, thread.lastposter, thread.lastposterid, thread.dateline, thread.views, thread.visible, thread.open, user.usergroupid, user.displaygroupid
            FROM thread AS thread
            LEFT JOIN user AS user ON (user.userid = thread.lastposterid)
            WHERE NOT ISNULL(thread.threadid) AND thread.visible = '1' AND thread.open!='10'  AND thread.forumid NOT IN(3,1,2,282,272,243,245,244,508,296,573,)
            ORDER BY lastpost DESC
            LIMIT 0, 10;

MySQL Error  : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')
            ORDER BY lastpost DESC
            LIMIT 0, 10' at line 4
Error Number  : 1064
Request Date  : Wednesday, February 13th 2013 @ 07:16:52 AM
Error Date    : Wednesday, February 13th 2013 @ 07:16:52 AM
Script        : http://p30pji.ir/forumdisplay.php?f=70
Referrer      :
IP Address    : 178.252.189.217
Username      : ثبت نام نشده
Classname    : vB_Database
MySQL Version :


Thank you

You have an extra , at the end of the where line. I've highlighted it below.

Code:

SELECT thread.threadid, thread.title, thread.lastpost, thread.forumid, thread.replycount, thread.postusername, thread.postuserid, thread.lastposter, thread.lastposterid, thread.dateline, thread.views, thread.visible, thread.open, user.usergroupid, user.displaygroupid
            FROM thread AS thread
            LEFT JOIN user AS user ON (user.userid = thread.lastposterid)
            WHERE NOT ISNULL(thread.threadid) AND thread.visible = '1' AND thread.open!='10'  AND thread.forumid NOT IN(3,1,2,282,272,243,245,244,508,296,573,)
            ORDER BY lastpost DESC
            LIMIT 0, 10;


LifesGreatestGift 02-13-2013 04:49 PM

I noticed that as well, was just wondering if it were a custom mod query or default vBulletin as it says the file is forumdisplay. not to say they arent using a hook inside forumdisplay, just the query seemed somewhat normal.


All times are GMT. The time now is 01:16 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.01046 seconds
  • Memory Usage 1,726KB
  • 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_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)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