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.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook