Gleb,

Thanks, eventually I find that the problem is not the special.

But the statement concat(field1,',',field2) as something will generate NULL if
the field1 is NULL.

Not sure if it's documented anywhere, or just a simple programming concept
that null plus anything equal null..




---------- Original Message -----------
From: Gleb Paharenko <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Sent: Mon, 13 Dec 2004 13:44:42 +0200
Subject: Re: how escape special in a field

> Hello.
> 
> See:
>   http://dev.mysql.com/doc/mysql/en/mysql_real_escape_string.html
> 
> Can you send complete test for your problem?
> 
> "YW CHAN (Cai Lun e-Business)" <[EMAIL PROTECTED]> wrote:
> > Hi,
> > 
> > I find there seems problem with this select statement when there is a 
> > special
> > character inside the table. i.e.
> > 
> > select concat(field_1, ',', field_2) as name where .......
> > 
> > field_2 actually is something like 'George, Banson' ( with a comma in
between )
> > 
> > i guess this , destroy the SQL syntax.
> > 
> > Is there any function for protecting this situation? 
> > 
> > Thanks for your help.
> > 
> > 
> > Regards, CHAN
> >
> 
> -- 
> For technical support contracts, goto https://order.mysql.com/?ref=ensita
> This email is sponsored by Ensita.NET http://www.ensita.net/
>    __  ___     ___ ____  __
>   /  |/  /_ __/ __/ __ \/ /    Gleb Paharenko
>  / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
> /_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.NET
>        <___/   www.mysql.com
> 
> -- 
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]
------- End of Original Message -------


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to