Problem with MySQL
#3

Quote:
Originally Posted by bondowocopz
Посмотреть сообщение
Change:
Код:
format(dquery, sizeof(dquery), "UPDATE objects SET oX = %f, oY = %f, oZ = %f, roX = %f, roY = %f, roZ = %f WHERE ScriptID = %d",object[i][oX],object[i][oY],object[i][roX],object[i][roY],object[i][roZ],object[i][oZ],object[i][oScriptID]);
To:
Код:
format(dquery, sizeof(dquery), "UPDATE objects SET `oX` = '%f', `oY` = '%f', `oZ` = '%f', `roX` = '%f', `roY` = '%f', `roZ` = '%f' WHERE `ScriptID` = %d",object[i][oX],object[i][oY],object[i][roX],object[i][roY],object[i][roZ],object[i][oZ],object[i][oScriptID]);
Add single quote on float.
It's not necessary when saving integer or float. Problem is here

Код:
format(dquery, sizeof(dquery), "UPDATE objects SET oX = %f, oY = %f, oZ = %f, roX = %f, roY = %f, roZ = %f WHERE ScriptID = %d",object[i][oX],object[i][oY],object[i][roX],object[i][roY],object[i][roZ],object[i][oZ],object[i][oScriptID]); 
                mysql_query(1, query);
You format dquery string, but query string is in mysql_query function. Use one string.
Reply


Messages In This Thread
Problem with MySQL - by Joseito - 27.05.2015, 02:56
Re: Problem with MySQL - by X337 - 27.05.2015, 05:04
Re: Problem with MySQL - by ball - 27.05.2015, 08:45
Respuesta: Problem with MySQL - by Joseito - 28.05.2015, 01:28

Forum Jump:


Users browsing this thread: 1 Guest(s)