mysql last row is all rows in one code example Example: mysql get last row SELECT fields FROM table ORDER BY id DESC LIMIT 1;