how to select last row in mysql table code example Example: mysql get last row SELECT fields FROM table ORDER BY id DESC LIMIT 1;