AndyB
Well-known member
I would like o change the following query:
to a XenForo query
but I get the following error message:
What is the correct syntax?
Thank you.
PHP:
$db->query("
UPDATE xf_user
SET message_count = message_count + 1
WHERE user_id = ?
", $newUserId);
to a XenForo query
PHP:
$db->update('xf_user',
['message_count' => message_count - 1],
'user_id = ?
AND message_count > ?',
[$oldUserId, 0]
);
but I get the following error message:
What is the correct syntax?
Thank you.