Forum Moderators: coopster

Message Too Old, No Replies

Log after query

         

FiRe

1:07 pm on Oct 9, 2007 (gmt 0)

10+ Year Member



I dont know if this is possible but I have lots of queries in my php website and I would like to log all of the sql statements going through my site, into a text file. It is a hassle to go back through my code and implement a function to do this, is there an oncomplete command or anything I can use without changing mysql_query? Hope this makes sense...

coopster

4:41 pm on Oct 9, 2007 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



How about checking your logs [dev.mysql.com]? Outside of that, a common approach is to use a separation layer where ALL of the queries are executed in a single class method or function where you have much more control over your query execution processing.