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-19-2005, 01:48 PM
kay9 kay9 is offline
 
Join Date: Jan 2005
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Invalid SQL: SELECT

hi, could anyone let me know what this means? a member was playing games in the arcade and all of a sudden this happen(via emails sent to admin etc)

Any help or guidence on this is much appreicated, thanks.

Quote:
Invalid SQL: SELECT
IF(votenum >= 2, votenum, 0) AS votenum, IF(votenum >= 2 AND votenum != 0,
votetotal / votenum, 0) AS voteavg,
thread.threadid, thread.title, replycount, postusername, postuserid,
thread.dateline AS postdateline, IF(views<=replycount, replycount+1, views) AS
views, forumid, post.postid, pagetext, allowsmilie, showsignature
,thread.iconid AS threadiconid
, attachment.filename, attachment.filesize, attachment.visible, attachmentid,
counter, thumbnail, LENGTH(thumbnail) AS thumbnailsize
, avatarpath, NOT ISNULL(avatardata) AS hascustom, customavatar.dateline AS
avatardateline
, NOT ISNULL(subscribethread.subscribethreadid) AS subscribed
FROM thread AS thread
LEFT JOIN post AS post ON (post.postid = thread.firstpostid)
LEFT JOIN user AS user ON (user.userid = post.userid)
LEFT JOIN attachment AS attachment ON (post.postid = attachment.postid)
LEFT JOIN avatar as avatar ON (avatar.avatarid = user.avatarid)
LEFT JOIN customavatar as customavatar ON (customavatar.userid = user.userid)
LEFT JOIN subscribethread AS subscribethread ON(subscribethread.threadid =
thread.threadid AND subscribethread.userid = 16)
WHERE forumid IN(4,15,16,51,70,)
GROUP BY post.postid
ORDER BY postdateline DESC, attachmentid LIMIT 8
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 ')
GROUP BY post.postid
ORDER BY postdateline DESC, atta

mysql error number: 1064

Date: Wednesday 19th of January 2005 12:46:13 PM
Script: MY.SITE.COM
Referer:
Username: XXXXXX
IP Address: XXXXX
Reply With Quote
  #2  
Old 01-19-2005, 01:56 PM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Weel the error is easy to explain, a trailing comma in the WHERE clause.

What this quesry got to do with the arcade, i don't know. Looks more like a UserCP query to me.

Can the user reproduce this, or was it a 1 time error.

Maybe he just clicked everywhere on the screen in teh heat of the game.
Reply With Quote
  #3  
Old 01-19-2005, 02:03 PM
kay9 kay9 is offline
 
Join Date: Jan 2005
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MarcoH64
Weel the error is easy to explain, a trailing comma in the WHERE clause.

What this quesry got to do with the arcade, i don't know. Looks more like a UserCP query to me.

Can the user reproduce this, or was it a 1 time error.

Maybe he just clicked everywhere on the screen in teh heat of the game.

the person was last using the arcade, and then some how was unable to gain access to the site sayin: slight problem with database etc

the error keeps happening, just for the user , but not sure if this is any help, someone who also tried to access the site via google, showed up on the error log.

everythings been running fine till now

user cp? ive ran maintence and diagonostics, but problem still the same
Reply With Quote
  #4  
Old 01-19-2005, 02:07 PM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Try running Update Counters->Fix broken user profiles.
Reply With Quote
  #5  
Old 01-19-2005, 02:30 PM
kay9 kay9 is offline
 
Join Date: Jan 2005
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks, tried it 3 times just now, but still the same problem.
Reply With Quote
  #6  
Old 01-19-2005, 02:41 PM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, create a new file called 'rebuild.php' in your forum home.

put the following in it, then run it:
PHP Code:
<?php

require_once('./includes/init.php');

require_once(
'./includes/functions.php');

require_once(
'./includes/adminfunctions.php');

build_options();

?>
After you run it you can remove the file. This wil try to rebuild your datastore table.
Reply With Quote
  #7  
Old 01-19-2005, 03:07 PM
kay9 kay9 is offline
 
Join Date: Jan 2005
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok, ran the file. Is it suppose to be white screen when run?

Quote:
There seems to have been a slight problem with XXXX database. Please try again by pressing the refresh button in your browser. An E-Mail has been dispatched to our Technical Staff, who you can also contact if the problem persist
same problem still occurs, it allows me to use the site as normal without any problems, but few users are now having the same problem :s
Reply With Quote
  #8  
Old 01-19-2005, 03:20 PM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes it will only give you a blank page.

When did you get that database error? While running the script?

I suggest you go to vbulletin.com and ask there or open a support ticket.
Reply With Quote
  #9  
Old 01-19-2005, 03:29 PM
kay9 kay9 is offline
 
Join Date: Jan 2005
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MarcoH64
Yes it will only give you a blank page.

When did you get that database error? While running the script?

I suggest you go to vbulletin.com and ask there or open a support ticket.
no, not by running the script, just the same problem as before with no change.

since i have hacks installed, i would only be told to come here.

i spent about 1hour reading through posts on there about similar problems, (mysql error number: 1064) but most of the help notes suggesting removing the hacks etc (which is not a option for me)
Reply With Quote
  #10  
Old 01-19-2005, 03:44 PM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I know that they will likely suggest you ask here. But i still think that you should ask there in this case.

Other option would be to install a fresh copy of vB and revert all changes to test.
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 08:26 PM.


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.02369 seconds
  • Memory Usage 2,257KB
  • 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
  • (1)bbcode_php
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)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_postinfo_query
  • fetch_postinfo
  • 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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete