MySQL Syntax error.
#1

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.

Код:
[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.
And this is the script.

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;
}
Please and thanks.

Код:
This forum requires that you wait 120 seconds between posts. Please try again in 15 seconds.
¬¬
Reply
#2

Use g_stylezz plugin, his debugging is better to read.


@ topic, you missing a ")" At end of VALUES
Reply
#3

Oh!

Thanks, lol didn't see that x)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)