MySQL error:Unknown table 'users' in field list
#1

Hi there,

I have been changing up my database a bit for future things that i have planned and i am now hung up on one strange error that i have yet to figure out.

The error is...
Код:
ERROR: id:1109 error: Unknown table 'users' in field list query: SELECT users.u_id,users.user,playerinfo.pass,playerinfo.vipdays,playerinfo.adminlvl,playe
Thats my debug print under onqueryerror and this is in the mysql log....
Код:
[21:48:08] [DEBUG] CMySQLResult::~CMySQLResult() - deconstructor called
[21:48:09] [DEBUG] mysql_tquery - connection handle: 1
[21:48:09] [ERROR] ExecuteT[OnAccountCheck(d)] - (error #1109) Unknown table 'users' in field list
[21:48:09] [DEBUG] ExecuteT[OnAccountCheck(d)] - error will be triggered in OnQueryError
[21:48:09] [DEBUG] Calling callback "OnQueryError"..
And below is the code...

pawn Код:
stock CheckAccount(playerid)
{
    new query[90];
    format(query, sizeof(query), "SELECT users.u_id,users.user,playerinfo.pass,playerinfo.vipdays,playerinfo.adminlvl,playerinfo.viplevel,playerinfo.vipskin FROM users INNER JOIN playerinfo ON users.u_id = playerinfo.id WHERE users.user = '%s' LIMIT 1", GetName(playerid));
    mysql_function_query(g_Handle, query, true, "OnAccountCheck", "d", playerid);

    return 1;
}
Now both databases are there and what really gets me is this query works great in phpmyadmin but throws that error above once i run it in my gamemode. I also load vip info so if the player is a legit registered player thats vip they can join the server with the reserved slots and if they have a vip skin set they can choose to bypass class selection. And staff into for the reserved slots the same as vip. I'm sure how i structured this query is probaly wrong but i'm just learning how to use INNER JOIN....

Any help would be greatly appreciated!

Thanks

EDIT: Fixed the error just overlooked the query string length and it wasn't long enough.
Reply


Messages In This Thread
MySQL error:Unknown table 'users' in field list - by nickdodd25 - 08.11.2013, 03:11

Forum Jump:


Users browsing this thread: 1 Guest(s)