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