SA-MP Forums Archive
MySQL get id - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: MySQL get id (/showthread.php?tid=416144)



MySQL get id - ComeMe - 16.02.2013

We have a system of furniture you want to save the edited the object do not know how to get the id of the object from the database.
pawn Код:
format (dbhandle, 512, "INSERT INTO` objects `(` modelid `,` x `,` y `,` z `,` rx ',' ry ',' rz `,` worldid `,` interiorid `) VALUES ('% d', '% f', '% f', '% f', '% f', '% f', '% f', '% d', '% d') ", objectmodel [playerid], Ox, Oy, Oz, Rx, Ry, Rz, wid, pint);
mysql_query (dbhandle);
id is auto increment and how do that when put SelectObject (playerid) when I select the object to say and id of the object database.