SA-MP Forums Archive
MySQL Select FROM * Error - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: MySQL Select FROM * Error (/showthread.php?tid=575027)



MySQL Select FROM * Error - SandKing94 - 23.05.2015

Code:
Код:
format(query,sizeof(query),"SELECT * FROM factions WHERE ID = '%d') ",pInfo[playerid][Faction]);
	mysql_function_query(Connection,query,false,"FactionInfo","i",playerid);
Error:
Код:
[14:23:53] [DEBUG] mysql_tquery - connection: 1, query: "SELECT * FROM factions WHERE ID = '38') ", callback: "FactionInfo", format: "i"
[14:23:53] [DEBUG] CMySQLQuery::Execute[FactionInfo] - starting query execution
[14:23:53] [ERROR] CMySQLQuery::Execute[FactionInfo] - (error #1064) 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 ')' at line 1
[14:23:53] [DEBUG] CMySQLQuery::Execute[FactionInfo] - error will be triggered in OnQueryError



Re: MySQL Select FROM * Error - Konstantinos - 23.05.2015

"SELECT * FROM factions WHERE ID = %d"


Re: MySQL Select FROM * Error - SandKing94 - 23.05.2015

Now it is:
Код:
[14:34:39] [DEBUG] mysql_tquery - connection: 1, query: "SELECT * FROM factions WHERE ID = 38) ", callback: "FactionInfo", format: "i"
[14:34:39] [DEBUG] CMySQLQuery::Execute[FactionInfo] - starting query execution
[14:34:39] [ERROR] CMySQLQuery::Execute[FactionInfo] - (error #1064) 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 ')' at line 1
[14:34:39] [DEBUG] CMySQLQuery::Execute[FactionInfo] - error will be triggered in OnQueryError



Re: MySQL Select FROM * Error - MikE1990 - 23.05.2015

Код:
format(query,sizeof(query),"SELECT * FROM factions WHERE ID = %d ",pInfo[playerid][Faction]);
	mysql_function_query(Connection,query,false,"FactionInfo","i",playerid);



Re: MySQL Select FROM * Error - Konstantinos - 23.05.2015

Quote:
Originally Posted by SandKing94
Посмотреть сообщение
Now it is:
Код:
[14:34:39] [DEBUG] mysql_tquery - connection: 1, query: "SELECT * FROM factions WHERE ID = 38) ", callback: "FactionInfo", format: "i"
[14:34:39] [DEBUG] CMySQLQuery::Execute[FactionInfo] - starting query execution
[14:34:39] [ERROR] CMySQLQuery::Execute[FactionInfo] - (error #1064) 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 ')' at line 1
[14:34:39] [DEBUG] CMySQLQuery::Execute[FactionInfo] - error will be triggered in OnQueryError
Re-look what I posted. I haven't used any ) and the parenthesis is what causing the error.


Re: MySQL Select FROM * Error - Staark - 23.05.2015

What is your mysql version ?