Ultragames
02-16-2008, 03:30 AM
Is there any way of running a MySQL query in a sort of test mode. Something along the lines of "If you wanted to actually run this query, it would work."
The only way I can think to do it, is to run a transaction and then roll it back, but I cannot use InnoDB or any other transaction capable format on my host.
The reasons I want to do this, is i have built an extensive PHP class, that runs anywhere from 3 to hundreds of queries. I have tested the class via PHP by making it print out the queries instead of running them so that I can visually inspect them, but if at all possible, I would like to step it up a notch and actually have MySQL test that all of the queries do not contain parse errors, without actually permanently applying the inserts, updates, and deletes.
Yes or No? If so, how?
Thanks!
The only way I can think to do it, is to run a transaction and then roll it back, but I cannot use InnoDB or any other transaction capable format on my host.
The reasons I want to do this, is i have built an extensive PHP class, that runs anywhere from 3 to hundreds of queries. I have tested the class via PHP by making it print out the queries instead of running them so that I can visually inspect them, but if at all possible, I would like to step it up a notch and actually have MySQL test that all of the queries do not contain parse errors, without actually permanently applying the inserts, updates, and deletes.
Yes or No? If so, how?
Thanks!