PDA

View Full Version : Posted on my forum, then MYSQL errors on certain threads!


vbem2
08-12-2009, 02:51 AM
So, I posted in a thread with two pictures and about a sentence, but VB had some sort of hiccup and the thread and others are now throwing up a mysql error. Here's the error:

Database error in vBulletin 3.7.0:

Invalid SQL:

SELECT *
FROM EMgarageVehicle
WHERE EMgarageVehicle.UserID =
AND (Retired = 0
OR Retired IS NULL);

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 (Retired = 0
OR Retired IS NULL)' at line 4
Error Number : 1064
Request Date : Tuesday, August 11th 2009 @ 11:49:11 PM
Error Date : Tuesday, August 11th 2009 @ 11:49:12 PM
Script : http://ecomodder.com/forum/showthread.php?t=8343
Referrer : http://ecomodder.com/forum/showthread.php/database-error-9614.html
IP Address : 98.110.10.181
Username : SVOboy
Classname : vB_Database
MySQL Version : 5.0.32-Debian_7etch5

Really scratching my head over this one. Thanks!

Lynne
08-12-2009, 02:58 AM
That is from a modification. You will need to disable the modification and then post in the modification thread for help as that is where support is given for modifications.

vbem2
08-12-2009, 03:28 AM
Well, the query is from code we've added to another part of the site, it can't exactly be disabled since it's not a vb plugin/product.

I'm still unsure why the simple posting would cause it to act up, and also why it would seemingly randomly affect threads.

Do you have any other suggestions from tracking down the problem?

Thanks!

--------------- Added 1250051454 at 1250051454 ---------------

Also, from the error it's sending I can't even tell what file it has a problem with. None of the files changed at that time so I wouldn't know why it would suddenly decide to have an error.

Lynne
08-12-2009, 03:47 AM
If it's from an unrelated part of the site, then it shouldn't be getting triggered when going to the showthread page. It wouldn't hurt to disable your plugins and see if that stops the errors.
Note: To temporarily disable the plugin system, edit config.php and add this line right under <?php

define('DISABLE_HOOKS', true);

Is there anything in your error_logs? And what about this hiccup you say vb had - what was that all about?

vbem2
08-12-2009, 04:08 AM
I'm not finding config.php, where is it?

Also, where do I find the error logs?

The first time I noticed the issue was when I posted two images on a thread, fire fox seemed to spaz out, and I was redirected to the mysql error page.

--------------- Added 1250054337 at 1250054337 ---------------

Figured it out. I deleted a user from the forum, which broke all the queries that involved userid of that user since it no longer existed. Gosh darn.

Lynne
08-12-2009, 04:21 AM
Glad you figured it out.

vbem2
08-12-2009, 04:26 AM
Thanks again, by the way!