UPDATE `accounts` SET `paid`='1' WHERE `id_number`='114210' ORDER BY `id` DESC LIMIT 1 Renders this error: You have an error in your SQL syntax near 'ORDER BY `id` DESC LIMIT 1 ' at line 1