MySQL query
#1

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..
Reply
#2

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.
Reply
#3

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


Forum Jump:


Users browsing this thread: 1 Guest(s)