What is the best way to log mysql queries with php? I was thinking to open a file and just write there, but then if I have multiple session working how can I be sure that every session write on it? Thanks
the issues of sessions will not be there, as the mysql server is going to fire queries on server in a queue manner... so using any mysql class can do the trick for you ... try googling with "MySQL PHP wrapper class" or visit www.phpclasses.org you will find lot of help there
Thanks, I'll have a look on it later. I am already creating a class to access mysql, but every user call my pages, and every page create a new class object, so I was thinking that there should be something static for every class instance, otherwise every user will try to write the file.