08.09.2010, 00:53
Hi there, I have a msql syntax error, that I can't seem to figure out.
This is the error in the mysql_log.txt.
And this is the script.
Please and thanks.
¬¬
This is the error in the mysql_log.txt.
Код:
[Tue Sep 07 19:51:28 2010] ------------------------- [Tue Sep 07 19:51:28 2010] Logging Started [Tue Sep 07 19:51:28 2010] ------------------------- [Tue Sep 07 19:51:28 2010] Connected (0) to root @ localhost via TCP/IP. [Tue Sep 07 19:51:28 2010] MySQL Version 5.1.36-community-log. [Tue Sep 07 19:51:28 2010] Function: mysql_query executed: "SELECT * FROM `bizzinfo`" with result: "0". [Tue Sep 07 19:51:28 2010] Function: mysql_store_result executed with result: "1" [Tue Sep 07 19:51:28 2010] Function: mysql_num_rows executed with result: "". [Tue Sep 07 19:51:28 2010] Function: mysql_free_result executed. [Tue Sep 07 19:51:28 2010] Function: mysql_query executed: "INSERT INTO `bizzinfo` (BizzName, Owner, Price, PayAmount, EntX, EntY, EntZ) VALUES ('A Test', 'For Sale', 20000, 5000, 0.000000, 0.000000, 0.000000" with result: "1". [Tue Sep 07 19:51:28 2010] Error (0): Failed to exeute query. 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.
pawn Код:
function CreateBusiness(Bizzname[], price, Float:EnterX, Float:EnterY, Float:EnterZ)
{
format(str, sizeof(str), "INSERT INTO `bizzinfo` (BizzName, Owner, Price, PayAmount, EntX, EntY, EntZ) VALUES ('%s', 'For Sale', %d, 5000, %f, %f, %f", Bizzname, price, EnterX, EnterY, EnterZ);
mysql_query(str);
return 1;
}
Код:
This forum requires that you wait 120 seconds between posts. Please try again in 15 seconds.