PDA

View Full Version : Problem with query


Antenastyle
09/07/2017, 03:09 PM
I have this error when it executes the query...

http://i.imgur.com/HERPKte.png

mysql_format(sqlConnection, query, sizeof(query), "INSERT INTO casas ('OwnerSQL', 'Nombre', 'ExtX', 'ExtY', 'ExtZ', 'ExtR', 'IntX', 'IntY', 'IntZ', 'IntR', 'IntID', 'Precio') VALUES (0, %e, %f, %f, %f, %f, %f, %f, %f, %f, %i, %i)", nombre, ext[0], ext[1], ext[2], ext[3], int[0], int[1], int[2], int[3], interiorid, precio);

Kane
09/07/2017, 03:32 PM
Change %e to '%e'.

Antenastyle
09/07/2017, 03:44 PM
Change %e to '%e'.

Not working, same problem

Kane
09/07/2017, 03:48 PM
Rename the fields from ' ' to ` ` .

StrikerZ
09/07/2017, 04:14 PM
mysql_format(sqlConnection, query, sizeof(query), "INSERT INTO `casas` (`OwnerSQL`, `Nombre`, `ExtX`, `ExtY`, `ExtZ`, `ExtR`, `IntX`, `IntY`, `IntZ`, `IntR`, `IntID`, `Precio`) VALUES ('0', '%e', '%f', '%f', '%f', '%f', '%f', '%f', '%f', '%f', '%i', '%i')", nombre, ext[0], ext[1], ext[2], ext[3], int[0], int[1], int[2], int[3], interiorid, precio);

Antenastyle
09/07/2017, 05:51 PM
Rename the fields from ' ' to ` ` .


mysql_format(sqlConnection, query, sizeof(query), "INSERT INTO `casas` (`OwnerSQL`, `Nombre`, `ExtX`, `ExtY`, `ExtZ`, `ExtR`, `IntX`, `IntY`, `IntZ`, `IntR`, `IntID`, `Precio`) VALUES ('0', '%e', '%f', '%f', '%f', '%f', '%f', '%f', '%f', '%f', '%i', '%i')", nombre, ext[0], ext[1], ext[2], ext[3], int[0], int[1], int[2], int[3], interiorid, precio);


Thank you! Worked