How can I return the rows deleted as objects? Would I have to query them, delete them, then compare deleted id’s with queried id’s, or is there an built-in way?
* I do not want to get how many rows deleted, I want the rows’s values
Using PDO with MySql, and returning rows as a “Media” class.
You would need to query the rows prior to deleting them. UPDATE, INSERT and DELETE only return the number of Rows Affected value. You may be able to extend this functionality with triggers, but personally, that might be overkill.