Re: MySQL class. Thoughts?
| From: | clive | Date: | Thu, 22 Jan 2009 13:55:42 +0000 |
| Subject: | Re: MySQL class. Thoughts? | ||
| References: | 1 2 3 4 5 6 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-287006@lists.php.net to get a copy of this message | ||
Chris wrote:
That won't tell you where a query comes from ;) Add a debug_backtrace into the class to also pinpoint where the query was called from. Complicated queries built on variables (or even just long queries built over multiple lines) will be hard to find just by looking at the mysql query log. I agree with chris and I do the same thing, also with a class or a wrapper function/s that handle your queries you can also decided on what databases the query should run, say you have Master-Slave replication setup with mysql, you could run selects on the slaves and updates/delete in the master without the class deciding which one it should run onClive