SA-MP Forums Archive
MySQL query - 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 query (/showthread.php?tid=484042)



MySQL query - Riddick94 - 28.12.2013

pawn Код:
"UPDATE `items` SET `objectid` = -1 AND `owner_uid` = %d WHERE `UID` = %d"
What is wrong with that query? It sets objectid to 0, but when I remove that bit:
pawn Код:
AND `owner_uid` = %d
It works perfectly.. but I have to save that value as well..


Re: MySQL query - Patrick - 28.12.2013

I do not know if there's a AND function in MySQL it should be ,(Comma) to seperate another function/row.

pawn Код:
"UPDATE `items` SET `objectid` = -1, `owner_uid` = %d WHERE `UID` = %d"
That should work.


Re: MySQL query - Riddick94 - 28.12.2013

There is actually "AND" but I didn't have to use it here.. damn.. still I need to learn more about MySQL. Thanks.