How do I modify a record and return the record content and query the record at the same time?

how to modify the record and return the record content and query the record at the same time, these are actually two aspects of the same problem, but can not be regarded as one problem;

  1. after modifying a record, how do I get the value of the modified record?
  2. has a table in which one column is a timestamp, and the value is automatically set when it is updated. At present, two statements are used. Now, let it update the value automatically when you want to query, or, as 1 said, how to change and return the field value at the same time?
Jun.01,2022

DML you have two manipulations. You can only update first and then select sql. You can encapsulate a method that takes this method every time you query, and this method first executes the update time to obtain data, and this data can also be cached. You only need to change the cached data time to the current request time, so you only need to execute update

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e44494-4ce3e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e44494-4ce3e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?