Find the answer to your Linux question:
Results 1 to 4 of 4
I'm running Fedora and I would like to know how to determine what query is sent to SQL via a web page written in PHP. I'm fairly new to mySQL ...
  1. #1
    Just Joined! DaWoo's Avatar
    Join Date
    Feb 2009
    Location
    Jersey
    Posts
    16

    [SOLVED] PHP and mySQL



    I'm running Fedora and I would like to know how to determine what query is sent to SQL via a web page written in PHP. I'm fairly new to mySQL and PHP so be easy on me. I know I'm missing tons of information to help you help me. But any help would be greatly appreciated.

  2. #2
    Trusted Penguin Roxoff's Avatar
    Join Date
    Aug 2005
    Location
    Nottingham, England
    Posts
    3,319
    The easiest way is probably to grep through your php pages for user of the 'mysqli' class, and put logging in where it calls the mysqli instance's 'query' method.
    Linux user #126863 - see http://linuxcounter.net/

  3. #3
    Trusted Penguin elija's Avatar
    Join Date
    Jul 2004
    Location
    Either at home or at work or down the pub
    Posts
    1,994
    It might be mysql rather than mysqli especially if the code is older
    I need a new signature. This one is boring!

    My blog. It's probably not as good as I think it is.

  4. #4
    Just Joined! DaWoo's Avatar
    Join Date
    Feb 2009
    Location
    Jersey
    Posts
    16
    thank you for your replies. I was able to obtain the queries grep-ing for mysql. Turns out that they used Java, PHP, and mySQL.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •