MySQL saving problem
#2

Inverted commas should be placed around the fields that you wanna edit, the same applies to table names. So it's not just the values that you wanna input into the table that you put inverted commas around. Additionally, I would recommend you to split you queries into parts, rather than do it all at once. A fragment of my code:

Код:
format(query, sizeof(query), "UPDATE `houses` SET `Owner` = '%s', `Pos_x` = '%f', `Pos_y` = '%f', `Pos_z` = '%f' WHERE `id` = '%d'",DomInfo[domid][hOwner], DomInfo[domid][hPos_x], DomInfo[domid][hPos_y], DomInfo[domid][hPos_z],  domid);
	send_query(query);
Where 'houses' is ofc the table name and the other fields are records that are to be edited.
Reply


Messages In This Thread
MySQL saving problem - by Baines - 15.01.2014, 23:54
Re: MySQL saving problem - by Rifa4life - 17.01.2014, 10:27

Forum Jump:


Users browsing this thread: 1 Guest(s)