Storing sql in MySQL

  • Thread starter rdx
  • Start date
rdx
50
0

Main Question or Discussion Point

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

verty
Homework Helper
2,157
198
Do your inserts have apostrophes? You'll need to double them (replace ' with '').
 
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 for: Storing sql in MySQL

  • Last Post
Replies
11
Views
1K
  • Last Post
Replies
4
Views
655
  • Last Post
Replies
3
Views
1K
  • Last Post
Replies
3
Views
528
  • Last Post
Replies
3
Views
1K
  • Last Post
Replies
16
Views
1K
  • Last Post
Replies
1
Views
4K
  • Last Post
Replies
1
Views
537
Top