PHP Fatal error: Uncaught Exception: 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 'UPDATE mytable SET status = "true", id = (SELECT @scanning_id := id) WHERE hr' at line 1 query: SET @id := 0; UPDATE mytable SET status = "true", id = (SELECT @scanning_id := id) WHERE params = "asdf" LIMIT 1; SELECT @scanning_id; in PHP_MySQLi_Database/MysqliDb.php:2006
I was looking as this https://stackoverflow.com/questions/1388025/how-to-get-id-of-the-last-updated-row-in-mysql#answer-1751282 . How to execute it ?
I have done :
I get the error :