When I try the following query:
UPDATE polls p1
SET p1.votes4 = (p1.votes4 + 1)
WHERE p1.id = (
FROM polls p2
I get this error:
#1093 - You can't specify target table 'polls' for update in FROM clause
Is it really not possible, to use the same table to get some info? But how can I otherwise find that info, that I need in the UPDATE clause?
I've found a workaround, but it uses two queries.