Logging database activity
Posted: Wed Aug 23, 2006 4:53 pm
I am codding an algoritm that uses the database as input and output.
I need to keep a log at least of all the queries. Afected rows and errors would be cool as well.
I would like the logs to be saved in a textfile.
One solution i thoght about is creating a wraper for mysql_query() that writes the query and the error ( if exists ) to the file. then use allways that function, mysql_query_w() for instance...
I remember when i used oracle it was possible to output a report after each instruction... is it anyway i can get that report ( it's equivalente for mysql ) into php?
thx in advance
I need to keep a log at least of all the queries. Afected rows and errors would be cool as well.
I would like the logs to be saved in a textfile.
One solution i thoght about is creating a wraper for mysql_query() that writes the query and the error ( if exists ) to the file. then use allways that function, mysql_query_w() for instance...
I remember when i used oracle it was possible to output a report after each instruction... is it anyway i can get that report ( it's equivalente for mysql ) into php?
thx in advance