Storing sql in MySQL

  • Thread starter rdx
  • Start date
  • #1
rdx
50
0
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?
 

Answers and Replies

  • #2
verty
Homework Helper
2,164
198
Do your inserts have apostrophes? You'll need to double them (replace ' with '').
 
  • #3
rdx
50
0
Do your inserts have apostrophes? You'll need to double them (replace ' with '').
Hmmm, I see what you mean.. I will look into it. Thanks.
 

Related Threads on Storing sql in MySQL

  • Last Post
Replies
11
Views
2K
  • Last Post
Replies
4
Views
771
  • Last Post
Replies
3
Views
1K
Replies
21
Views
758
  • Last Post
Replies
3
Views
617
  • Last Post
Replies
16
Views
1K
  • Last Post
Replies
3
Views
1K
  • Last Post
Replies
1
Views
4K
  • Last Post
Replies
1
Views
2K
  • Last Post
Replies
1
Views
627
Top