I have a PHP script with one select query and several prepared update statements. Is there a way to run the script in test mode so that no changes are written to the database?
I have a PHP script with one select query and several prepared update statements.
Share
You can wrap the whole thing in a transaction, and then rollback the transaction after the other test queries are done.
That, or you dump out the table(s) involved, and restore the dump after each test, so you keep the environment consistent between each run.