Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Storing sql in MySQL

  1. Feb 12, 2007 #1


    User Avatar

    Goal: I seek to log the SQL statements into a MySQL table, with the time they were executed as an aid to debugging problems with PHP apps I am writing.

    Problem: MySQL seems to try to interpret the statement, meant to simply be data in a field. When I try to "INSERT" the values, I get MySQL syntax errors.

    Solution: Does anyone have a way around this problem?
  2. jcsd
  3. Feb 12, 2007 #2


    User Avatar
    Homework Helper

    Do your inserts have apostrophes? You'll need to double them (replace ' with '').
  4. Feb 13, 2007 #3


    User Avatar

    Hmmm, I see what you mean.. I will look into it. Thanks.
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Similar Discussions: Storing sql in MySQL
  1. SQL basics (Replies: 4)

  2. SQL relationships (Replies: 3)

  3. Sql join? (Replies: 4)

  4. SQL Help (Replies: 2)