Re: [PATCH] dlr_mysql.c needs to use mysql_escape_string() from mysql API
Alexander Malysh <[email protected]>
| Newsgroups | gmane.comp.mobile.kannel.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi,
it would be easier to use bind variables and then check if you have
mysql version > 5 then you don't need to do anything because bind
variables are supported and if not then escape strings with real_escape
because you have connection at this place.
Thanks,
Alex
Stipe Tolj schrieb:
> Thomas Göttgens schrieb:
>> Hello Stipe,
>>
>> there's a difference between mysql_escape_string and
>> mysql_real_escape_string, the latter taking the database locale
>> (e.g. charset) into account. Some charsets may need escaping for
>> additional characters, which only the 'real' flavor of this function
>> handles correctly. Drawback is that mysql_real_escape strig needs an
>> open and valid connection handle to determine the charset used on the
>> server.
>>
>> http://dev.mysql.com/doc/refman/5.0/en/mysql-escape-string.html
>>
>> http://dev.mysql.com/doc/refman/5.0/en/mysql-real-escape-string.html
>
> Hi Thomas,
>
> ok, got the point.
>
> Comments from the others concerning this?
>
> Stipe
>
> -------------------------------------------------------------------
> Kölner Landstrasse 419
> 40589 DÃŒsseldorf, NRW, Germany
>
> tolj.org system architecture Kannel Software Foundation (KSF)
> http://www.tolj.org/ http://www.kannel.org/
>
> mailto:st_{at}_tolj.org mailto:stolj_{at}_kannel.org
> -------------------------------------------------------------------
>
>