ibProArcade 2.6.8 and VB 3.8.2 MYSQL Error

Wolff

New Member
hi, i get this mysql error if i try to join the playing hall, can sb help me?

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=1635) 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=1635 OR user.userid=1635

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=1635) AS user LEFT JOIN avatar
mySQL error code:
Date: Friday 22nd of May 2009 04:35:27 AM

greetz wolff
 

bluescorpion

New Member
solution from author:

open /arcade/functions/dbclass.php

search for
Code:

PHP:
if (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


PHP:
$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;
 
Top