Maybe you shoul write your insert statement like this. insert into LogTable set SQL='select ''abc'' from table';
On Sun, Jun 22, 2008 at 3:46 AM, mos <[EMAIL PROTECTED]> wrote: > I have my own log table which contains a Text column that is suppose to > store SQL statements that fail to execute properly. My problem is when I use > an > > Insert into LogTable set SQL='select 'abc' from table;-- this comment > screw's things up;#13#10update table x set v='ddd';...' > > I get all sorts of problems because of the quotes, comments and ";" that is > embedded in the SQL is being interpreted as another SQL command. Is there > any easy way of implementing this? Or am I going to have to escape every > quote, ';', and '"' in the sql value? > > TIA > Mike > > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: > http://lists.mysql.com/[EMAIL PROTECTED] > > -- I'm a MySQL DBA in china. More about me just visit here: http://yueliangdao0608.cublog.cn