how to select the last item of a row in a mysqli database code example Example: mysqli last row SELECT id FROM table ORDER BY id DESC LIMIT 1;