Quote:
Originally posted by sk187
This is an amazing hack and it seems to work perfect for most of my 700 users but vbulletin has been emailing me about sql errors.
Like this
Database error in vBulletin 2.2.6:
Invalid SQL: SELECT sessionhash,userid,host,useragent,styleid FROM session WHERE lastactivity>1032214124 AND sessionhash='de0056fe406cbbd965a806bbd71f3dde' AND (host='198.81.26.175' OR (althash='' AND althash<>'')) AND useragent='Mozilla/4.0 (compatible; MSIE 6.0; AOL 7.0; Window'
mysql error: Unknown column 'althash' in 'where clause'
mysql error number: 1054
|
This error is unrelated to my hack. You have apparently inadvertently installed some sort of vBulletin 2.2.7 code into your vBulletin 2.2.6 -- the althash field is something that was introduced in 2.2.7.
Quote:
and
Database error in vBulletin 2.2.7:
Invalid SQL: SELECT max(score) as maxscore FROM arcade WHERE game='pacman' AND username='TL's De La Hoya'
mysql error: You have an error in your SQL syntax near 's De La Hoya'' at line 1
mysql error number: 1064
|
This is a known bug having to do with the ' character in a user's name. It has been FIXED for Beta 2. For Beta 1, find this line in proarcade.php:
PHP Code:
$userscore_q = $DB_site->query_first("SELECT max(score) as maxscore FROM arcade WHERE game='$gamename' AND username='$username'");
And change it to this:
PHP Code:
$theusername = addslashes($username);
$userscore_q = $DB_site->query_first("SELECT max(score) as maxscore FROM arcade WHERE game='$gamename' AND username='$theusername'");
That should fix the error.