Is it possible to select the last (by the time of adding to the table) record in the table, if there is no time to add the record to the field?
For example, I have an sms_map table with two fields, sms_in_id and sms_out_id , and the following query:
SELECT * FROM `sms_map` WHERE `sms_out_id` = 3251; returns the following result:
2521 3251
3221 3251
3216 3251
I would like to get the latest entry. The query with sorting does not suit me, since the query:
SELECT * FROM `sms_map` WHERE `sms_out_id` = 3251 ORDER BY `sms_in_id` DESC LIMIT 1; returns the last record by the field value, and not by the time the record was added to the table.