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