Hi
i want to update the recorde like this
[CODE=mysql]
UPDATE category_shops SET category_shops_ id = (SELECT MAX(`category_s hops_id`)+1 FROM category_shops) WHERE category_shops_ id = 0 AND shop_id= 14856 AND category_id = 14
[/CODE]
but getting the error
"1093 - You can't specify target table 'category_shops ' for update in FROM clause "
please help me
i want to update the recorde like this
[CODE=mysql]
UPDATE category_shops SET category_shops_ id = (SELECT MAX(`category_s hops_id`)+1 FROM category_shops) WHERE category_shops_ id = 0 AND shop_id= 14856 AND category_id = 14
[/CODE]
but getting the error
"1093 - You can't specify target table 'category_shops ' for update in FROM clause "
please help me
Comment