It seems a simple question but unfortunately I can’t find examples.
Suppose that I want use the UPDATE sentence into php for updating the last 10 records of my table “users” of Database “users”. what its the code for that? I mean INSERT sentence have a
answer for that using LIMIT etc, but UPDATE dont have it.
Thanks in advance for your help.
pd: For example, I want to update “Firstname” field with “michael” word in the last 10 records.
Try this
As per Mysql docs, if there is a unique column, order by it DESC, and use LIMIT 10 to select last 10 records.