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

Reply
 
Thread Tools Display Modes
  #1  
Old 08-14-2012, 06:53 PM
dlewisr dlewisr is offline
 
Join Date: Mar 2011
Posts: 88
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default MSQL Error with same user.

This is an error that I get with only one particular member. It doesn't happen all the time, sometimes he can log on no problem and others he can't log on at all. Any ideas as to what may be causing it and how to rectify the issue.

Thanks in advance.

Database error in vBulletin 4.2.0:

Invalid SQL:

SELECT COUNT(post.postid) as unread
FROM post as post /*FORCE INDEX (dateline)*/
INNER JOIN thread as thread USING (threadid)
INNER JOIN forum AS forum USING (forumid)
LEFT JOIN threadread AS threadread ON (threadread.threadid = thread.threadid AND threadread.userid = 70)
LEFT JOIN forumread AS forumread ON (forumread.forumid = forum.forumid AND forumread.userid = 70)
WHERE thread.forumid IN(0) AND thread.visible IN (1)
AND post.dateline > IF(threadread.readtime IS NULL, , threadread.readtime)
AND post.dateline > IF(forumread.readtime IS NULL, , forumread.readtime)
AND post.dateline >
AND thread.lastpost > IF(threadread.readtime IS NULL, , threadread.readtime)
AND thread.lastpost > IF(forumread.readtime IS NULL, , forumread.readtime)
AND thread.lastpost >;

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 ' threadread.readtime)
AND post.dateline > IF(forumread.readtime IS NULL, ,' at line 8
Error Number : 1064
Reply With Quote
  #2  
Old 08-14-2012, 08:44 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I cannot find that query at all in the default vB4.2.0 files. Have you tried disabling your modifications to see if the error goes away?
Reply With Quote
  #3  
Old 08-15-2012, 06:25 AM
dlewisr dlewisr is offline
 
Join Date: Mar 2011
Posts: 88
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi Lynne, thanks for the reply. It doesn't happen all the time with him, maybe once every 4 - 5 days and it is only with this same user. I haven't done any changes or added any mods for quite a while. I've been looking for 'threadread.readtime' errors as that seems to be the common denominator, but can't find anything. I'll keep looking.

Thanks again.

--------------- Added [DATE]1345015947[/DATE] at [TIME]1345015947[/TIME] ---------------

Just found this and will look into it on my next day off

https://www.vbulletin.com/forum/arch.../t-160713.html
Reply With Quote
  #4  
Old 08-15-2012, 12:26 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by dlewisr View Post
Just found this and will look into it on my next day off

https://www.vbulletin.com/forum/arch.../t-160713.html

That probably won't help you because that's a completely different query. The problem seems to be an error in the php code that's doing the query, so you need to find the exact place in the code where that specific query is done. As Lynne suggested, it doesn't appear to be in the vb code so that only leaves plugins. There's a similar query in the vb code that has to do with finding new threads and posts since last login, so if you have any mods related to that, that might be a good place to look.
Reply With Quote
  #5  
Old 08-16-2012, 06:24 PM
dlewisr dlewisr is offline
 
Join Date: Mar 2011
Posts: 88
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Cheers kh99

Things have progressed since my last post and not for the better. Now searching of new posts are stuck in loops and/or returning 500 Internal Errors, error log is showing that threads don't exist. I had similar issues some time ago when using the 'Mark Forums Read' tab which took us all to a 404 page, I solved that with a redirect in the .htacess file, as the changes for 'missing security token' seemed too complicated for me to follow, however the redirect didn't actually solve the initial problem. Not even sure if they are all connected to one issue.

I've uninstalled the mod 'Unread posts' and a couple of others. No improvement though. Still going through the others to see what is new post or thread related.
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 10:58 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.10790 seconds
  • Memory Usage 2,202KB
  • 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_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (5)post_thanks_box
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (5)post_thanks_postbit_info
  • (5)postbit
  • (5)postbit_onlinestatus
  • (5)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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete