Insert To Mysql
#2

You seem to be feeding mysql_format a string. Use it like this instead.

Code:
mysql_format(SQL, query, sizeof(query), "INSERT INTO `houses` (`EnterX`, `EnterY`, `EnterZ`, `Price`) VALUES ('%f', '%f', '%f', '%d')", x, y, z, price);
Also, why are the variables x, y and z when at the top of the command you create pX, pY and pZ? Are they defined and set somewhere else?

If that doesn't work, make sure the fields in the MySQL database aren't defined as integers
Reply


Messages In This Thread
Insert To Mysql - by Mondialw98 - 06.04.2019, 23:01
Re: Insert To Mysql - by Markski - 07.04.2019, 00:09
Re: Insert To Mysql - by Mondialw98 - 07.04.2019, 12:15

Forum Jump:


Users browsing this thread: 1 Guest(s)