SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    AdSpeed.com Son Nguyen's Avatar
    Join Date
    Aug 2000
    Location
    Silicon Valley
    Posts
    2,241
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I want to know the list of queries I ran lately, how can I do such a thing?
    Thank you.
    - Son Nguyen
    AdSpeed.com - Ad Serving and Ad Management Made Easy

  2. #2
    SitePoint Wizard
    Join Date
    Apr 2000
    Posts
    1,483
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Don't think this is possible - there might be a way to enable logging but I know that it isn't done by default
    Why would you want such a thing? Surely it would be full of queries made from web programs?

  3. #3
    AdSpeed.com Son Nguyen's Avatar
    Join Date
    Aug 2000
    Location
    Silicon Valley
    Posts
    2,241
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I know that list gonna be huge. However, just like a log file for your site! You could also know in case some weird input you do.

    Anyway, since James is not sure, could anyone tell me?
    Since in "show status;", we could see the number of questions (# of queries). But how to get the list of these queries, or the server doesn't even log them?
    - Son Nguyen
    AdSpeed.com - Ad Serving and Ad Management Made Easy

  4. #4
    ********* wombat firepages's Avatar
    Join Date
    Jul 2000
    Location
    Perth Australia
    Posts
    1,717
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I would log them to a text file, an excellent way to rebuild after any major setback, just save the SQLquery string to file along with a timestamp whenever you make the SQL call.

    And no, I do not think that you can get this info from MySQL itself.

  5. #5
    AdSpeed.com Son Nguyen's Avatar
    Join Date
    Aug 2000
    Location
    Silicon Valley
    Posts
    2,241
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    So the server doesn't log queries?
    Since the queries my scripts execute are not that dangerous. What about the situation when someone could login and send information (secretly!)
    Just a bit careful!
    - Son Nguyen
    AdSpeed.com - Ad Serving and Ad Management Made Easy

  6. #6
    ********* wombat firepages's Avatar
    Join Date
    Jul 2000
    Location
    Perth Australia
    Posts
    1,717
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The server has nothing to do with the database they are not really interested in each other, your server logs who,when,wher from errors etc but thats it.

    Not sure what you mean about sending info(secretly)? do you mean malicious code? if anything dodgy gets as far as your SQL call you are in trouble anyway, putting it in a flatfile can do no harm. Make sure that any input is checked first using addslashes() etc (if magic_quotes_runtime is not already doing it for you.)

  7. #7
    AdSpeed.com Son Nguyen's Avatar
    Join Date
    Aug 2000
    Location
    Silicon Valley
    Posts
    2,241
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the advice, but with the queries the scripts generate, I believe I could control.

    Well, like people get information from your DB, then they don't do anything harmful(deleting/changing stuff) or do anything that you could doubt someone is accessing. What they could do with the information is really unexpected!
    - Son Nguyen
    AdSpeed.com - Ad Serving and Ad Management Made Easy


Bookmarks

Posting Permissions

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