PDA

View Full Version : How to fix this DB error?


katie hunter
11-10-2013, 02:07 AM
I never seen this db error but all of a sudden i am seeing it reported in my email. Any idea how can i fix it?

Database error in vBulletin 4.2.1:

Invalid SQL:

SELECT
gifts.gifttypeid, gifts.giftid, gifts.comment, gifts.message,
gifts.private, gifts.recipient, gifts.recipientid, gifts.sender,
gifts.senderid, gift_type.image
FROM gifts AS gifts
LEFT JOIN gift_type AS gift_type ON(gifts.gifttypeid = gift_type.gifttypeid)
WHERE recipientid =
ORDER BY dateline DESC
LIMIT 5;

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 'ORDER BY dateline DESC
LIMIT 5' at line 8
Error Number : 1064
Request Date : Saturday, November 9th 2013 @ 07:54:56 PM
Error Date : Saturday, November 9th 2013 @ 07:54:56 PM
Script : http://forum.nihonomaru.com/member.php?username=%20%E2%84%9DinReferrer :
IP Address :
Username : ℝin
Classname : vB_Database
MySQL Version :

ozzy47
11-10-2013, 02:10 AM
Do you have a mod that deals with gifts?

nerbert
11-10-2013, 02:53 AM
Looks like a mod that doesn't verify if a recipient is specified when submitted. The mod developer needs to fix that. In the mean time it probably isn't hurting anything, it just doesn't work when the form isn't fully filled out.

tbworld
11-10-2013, 03:02 AM
Looks like a mod that doesn't verify if a recipient is specified when submitted. The mod developer needs to fix that. In the mean time it probably isn't hurting anything, it just doesn't work when the form isn't fully filled out.

Not a bad take on it @Nerbert! :)

ozzy47
11-10-2013, 03:04 AM
Looks like it is from this mod, https://vborg.vbsupport.ru/showthread.php?t=189788

katie hunter
11-10-2013, 07:07 AM
Nop it is made from ground up for vb 4.x but the dev who made it logs in every day and doesn't reply >.> no matter how many times i poke him.

Still i need to figure out how to fix it. Do you want me to provide a specific php file ?

ozzy47
11-10-2013, 10:23 AM
I don't know what the person told you who made the mod for you, but it is not built from the ground up, the query you are having issues with is the same exact query in the mod I linked you to.

katie hunter
11-10-2013, 01:18 PM
Really? Do you know how i can fix it ?

ozzy47
11-10-2013, 01:21 PM
Not really, without the full mod, it is impossible to tell what may be causing the issue. Even then it may be a pain to track down.