Records in database tables are stored in sets. The database cannot guarantee that the order in which records are stored is the order in which you insert records.
So according to what you said, if you want to get the previous or next record of a record, you must use the order clause to sort the retrieved results, and then use the limit clause to get the record at the corresponding position.
Records in database tables are stored in sets. The database cannot guarantee that the order in which records are stored is the order in which you insert records.
So according to what you said, if you want to get the previous or next record of a record, you must use the order clause to sort the retrieved results, and then use the limit clause to get the record at the corresponding position.