Log queries

Discussion in 'PHP' started by ma0, Mar 13, 2007.

  1. #1
    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
     
    ma0, Mar 13, 2007 IP
  2. rays

    rays Active Member

    Messages:
    563
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    58
    #2
    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
     
    rays, Mar 13, 2007 IP
  3. ma0

    ma0 Peon

    Messages:
    218
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #3
    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.
     
    ma0, Mar 13, 2007 IP