vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Invalid SQL error in VB 2.3.2 (https://vborg.vbsupport.ru/showthread.php?t=95011)

ChAiN LeTtEr 08-24-2005 09:58 PM

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? :(

Marco van Herwaarden 08-25-2005 06:24 AM

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.)

ChAiN LeTtEr 08-25-2005 06:46 AM

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

Marco van Herwaarden 08-25-2005 07:19 AM

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.

ChAiN LeTtEr 08-25-2005 02:51 PM

Ok, thanks. :)


All times are GMT. The time now is 04:17 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.00918 seconds
  • Memory Usage 1,719KB
  • 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
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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