Reputation: 1491
i have some issues with this sql
UPDATE `rate` FROM `dv_post` SET `rate`=1 WHERE `id` = 9
The response :
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near
'FROMdv_post
SETrate
=1 WHEREid
= 9' at line 2'
Upvotes: 0
Views: 63
Reputation: 15670
The syntax of your update query is incorrect and shouldn't include the FROM
.
Try this:
UPDATE `dv_post` SET `rate`=1 WHERE `id` = 9
Upvotes: 1
Reputation: 219804
Update statements don't have a FROM
clause
UPDATE `dv_post` SET `rate`=1 WHERE `id` = 9
Upvotes: 3