Artificial intelligence, zero-based entry! http://www.captainbed.net/inner
The first method: select the time range, and then sort in reverse order, use the limit keyword to check only the first row is the last record
|
The second method: the primary key id of the database table is generally set to self-increase, so directly find the largest id is the last record
|
I have encountered this requirement in business, so record it!