View Full Version : mySQL query error after upgrade
ukDesign
01-11-2009, 05:21 AM
Hi I am on VB 3.8.0 and have just upgraded the arcade and I get the following error.
mySQL query error: SELECT user.userid, user.avatarid, user.avatarrevision, avatar.avatarpath, customavatar.filename, NOT ISNULL(filedata) AS hascustom, customavatar.dateline FROM (SELECT * FROM user WHERE userid=13) AS user LEFT JOIN avatar AS avatar ON avatar.avatarid = user.avatarid LEFT JOIN customavatar AS customavatar ON customavatar.userid = user.userid WHERE customavatar.userid=13 OR user.userid=13
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 'SELECT * FROM user WHERE userid=13) AS user LEFT JOIN avatar AS
mySQL error code:
Date: Sunday 11th 2009f January 2009 02:06:06 AM
Is it possible to solve this without uninstalling and reinstalling?
Robi_Kenobi
01-15-2009, 08:30 PM
Same problem here, can someone help please :( ?
Gemini II
01-16-2009, 01:19 PM
same problem:
I've just installed v2.6.8 ...from the beginnig. I didn't have any version.
It seems workd, I plat a game, Submit the score and the entire section stop working...
mySQL query error: SELECT user.userid, user.avatarid, user.avatarrevision, avatar.avatarpath, customavatar.filename, NOT ISNULL(filedata) AS hascustom, customavatar.dateline FROM (SELECT * FROM vb3_user WHERE userid=874) AS user LEFT JOIN vb3_avatar AS avatar ON avatar.avatarid = user.avatarid LEFT JOIN vb3_customavatar AS customavatar ON customavatar.userid = user.userid WHERE customavatar.userid=874 OR user.userid=874
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 'SELECT * FROM vb3_user WHERE userid=874) AS user LEFT JOIN vb3_
mySQL error code:
Date: Friday 16th of January 2009 04:08:20 PM
what's wrong with me? ;_;
MrZeropage
01-17-2009, 02:30 PM
solution:
open /arcade/functions/dbclass.php
search forif (function_exists("mysql_get_client_info"))
{
if(mysql_get_client_info() < 4.1)
{
// query for older mySQL-versions (<4.1)
// which is putting more load on the server and is slower
$the_query = "SELECT user.userid, user.avatarid, user.avatarrevision, avatar.avatarpath, customavatar.filename, NOT ISNULL(".$avatarkompatibel.") AS hascustom, customavatar.dateline FROM ibf_user AS user LEFT JOIN ibf_avatar AS avatar ON avatar.avatarid = user.avatarid LEFT JOIN ibf_customavatar AS customavatar ON customavatar.userid = user.userid WHERE customavatar.userid=" . $idneeded . " OR user.userid=".$idneeded;
}
}
below it add
$the_query = "SELECT user.userid, user.avatarid, user.avatarrevision, avatar.avatarpath, customavatar.filename, NOT ISNULL(".$avatarkompatibel.") AS hascustom, customavatar.dateline FROM ibf_user AS user LEFT JOIN ibf_avatar AS avatar ON avatar.avatarid = user.avatarid LEFT JOIN ibf_customavatar AS customavatar ON customavatar.userid = user.userid WHERE customavatar.userid=" . $idneeded . " OR user.userid=".$idneeded;
next version will be more sensible in using newer mySQL-commands ;)
Gemini II
01-17-2009, 11:22 PM
thanks a lot :)
Raptor
03-20-2009, 01:58 PM
thanks - this fixed my problem (vb 3.8.1 - upgrading IBP from 2.6.7 to 2.6.8)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.