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 08-24-2005, 09:58 PM
ChAiN LeTtEr's Avatar
ChAiN LeTtEr ChAiN LeTtEr is offline
 
Join Date: Aug 2002
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Invalid SQL error in VB 2.3.2

Hello,

We switched hosts awhile back and had someone move our forum over. Since then, we've had errors. We can't add new styles and when you try and search for all posts by a user, we get an error. Here is one:

Invalid SQL: SELECT COUNT(*) AS posts FROM post
LEFT JOIN thread ON thread.threadid=post.threadid WHERE post.visible=1 AND post.threadid= AND 1=1 AND NOT (thread.forumid='3' OR thread.forumid='14' OR thread.forumid='83' OR thread.forumid='31' OR thread.forumid='32' OR thread.forumid='76' OR thread.forumid='36' OR thread.forumid='42') AND post.userid='1804'
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 'AND 1=1 AND NOT (thread.forumid='3' OR thread.forumid='14' OR

mysql error number: 1064

Date: Wednesday 24th of August 2005 06:54:00 PM
Script: http://www.theoc-boards.com/forum/fo...searchid=57270


Any ideas?

Thanks in advance!

I just realized that link has /forum/forum/search.php which is probably not right. But why does it show up like that? When you copy the link location of the search for a certain user, it is this: http://www.theoc-boards.com/forum/se...er&userid=2252 Only 1 /forum/.

Hmm

Actually, have 2 errors. Here's the second:

Database error in vBulletin Control Panel 2.3.2:

Invalid SQL: INSERT INTO style (styleid,title,replacementsetid,templatesetid,user select) VALUES (NULL,'TestingJenny','90','1','0','justtesting','y uptesting')
mysql error: Column count doesn't match value count at row 1

mysql error number: 1136

Date: Wednesday 24th of August 2005 07:22:27 PM
Script: http://www.theoc-boards.com/forum/forum/admin/style.php
Referer: http://www.theoc-boards.com/forum/ad...?action=add&s=

Any ideas?
Reply With Quote
  #2  
Old 08-25-2005, 06:24 AM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The problem with the SQL is that there is no value given for 'AND post.threadid= '. What is causing this i can not answer, and since i have no experience with vB2 it would be very difficult to search for an answer.

The second problem makes me think that you had installed some hacks on your old server, and have used a fresh copy of vB software on the new server. Can you confirm this? (PS that might also be causing your first problem.)
Reply With Quote
  #3  
Old 08-25-2005, 06:46 AM
ChAiN LeTtEr's Avatar
ChAiN LeTtEr ChAiN LeTtEr is offline
 
Join Date: Aug 2002
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yeah, I think that's probably right, about the hacks. I mean, yes, we installed some hacks, and due to problems and some uh, major issues with the old server (which is finally what caused us to change hosts), we had to start fresh and then copy over (or something. I didn't do it. Someone else did.).

*sigh* lol
Reply With Quote
  #4  
Old 08-25-2005, 07:19 AM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Then my guess is that the problems are caused by the database is not 'in sync' with the software anymore. You would have to either reinstall the modifications to the scripts, or to undo the changes to the database.

I am not sure if ImpEx supports vB2->vB2, but that could be a way to go to get the database cleaned.
Reply With Quote
  #5  
Old 08-25-2005, 02:51 PM
ChAiN LeTtEr's Avatar
ChAiN LeTtEr ChAiN LeTtEr is offline
 
Join Date: Aug 2002
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, thanks.
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:42 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.03904 seconds
  • Memory Usage 2,195KB
  • Queries Executed 11 (?)
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)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_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