Re: mysql help (sorry, a bit OT)
| From: | ash@ashleysheridan.co.uk | Date: | Tue, 16 Nov 2010 13:48:53 +0000 |
| Subject: | Re: mysql help (sorry, a bit OT) | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-309508@lists.php.net to get a copy of this message | ||
It's always best practice to have a staging server for testing these sorts of things.
If in doubt, run it in a transaction, but don't commit it, I.e. roll it back. That way
you'll see if it would run but nothing actually changes.
Thanks,
Ash
http://www.ashleysheridan.co.uk
----- Reply message -----
From: "Gary" <php-general@garydjones.name>
Date: Tue, Nov 16, 2010 13:35
Subject: [PHP] mysql help (sorry, a bit OT)
To: <php-general@lists.php.net>
Is there a way to check the syntax of a query, short of running it? I've
got an insert to do (but of course it's a valid question for any query
that changes the db contents) and would like to know that the sql I am
generating (in php - see! not so off-topic!) is correct.
What I don't want to do is run it for testing (live system *sigh*) and
find out it is correct (it will change the db), but... I have to test it
to check that the syntax (at least) *is* correct.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php