Transactions
https://stackoverflow.com/questions/19821736/mysql-move-rows-from-one-table-to-another
https://www.freecodecamp.org/news/how-to-use-mysql-transactions/
https://www.phptutorial.net/php-pdo/php-pdo-transaction/
Prepared Statements
https://stackoverflow.com/questions/19106963/php-prepared-statements-and-transactions-in-a-loop