mysql query error
#1

Im trying to do this query but it wont work let me show you.
pawn Код:
format(query, sizeof(query),"INSERT INTO bizinfo (bid, benterx, bentery, benterz, bexitx, bexity, bexitz, binterior, bvalue, bname) VALUES (NULL,'%f','%f','%f','%f','%f','%f','%d','%d','%s'",
    pPOS[0],pPOS[1],pPOS[2], interiors[bint][posx],interiors[bint][posy],interiors[bint][posz],interiors[bint][hint],bprice,bbname);
    mysql_query(query);
The error is this one
Quote:

An error has occured. (Error ID: 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)

Reply
#2

You forgot ")"

pawn Код:
format(query, sizeof(query),"INSERT INTO bizinfo (bid, benterx, bentery, benterz, bexitx, bexity, bexitz, binterior, bvalue, bname) VALUES (NULL,'%f','%f','%f','%f','%f','%f','%d','%d','%s')",
    pPOS[0],pPOS[1],pPOS[2], interiors[bint][posx],interiors[bint][posy],interiors[bint][posz],interiors[bint][hint],bprice,bbname);
    mysql_query(query);
Reply
#3

Worked just fine thanks mate. Just one thing where did I miss the ")"?
Reply
#4

Here :

Код:
format(query, sizeof(query),"INSERT INTO bizinfo (bid, benterx, bentery, benterz, bexitx, bexity, bexitz, binterior, bvalue, bname) VALUES (NULL,'%f','%f','%f','%f','%f','%f','%d','%d','%s')",
    pPOS[0],pPOS[1],pPOS[2], interiors[bint][posx],interiors[bint][posy],interiors[bint][posz],interiors[bint][hint],bprice,bbname);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)