Re: unescaping strings with the C api

2008-06-12 Thread Tim Johnson
On Thursday 12 June 2008, David Giragosian wrote: > The same is true of mysql_real_escape_string() in PHP. You escape > special characters upon update or insertion, but upon viewing the data > in the DB or retrieving it programmatically, the data simply appear as > it was originally before use of

Re: unescaping strings with the C api

2008-06-12 Thread David Giragosian
On 6/12/08, Tim Johnson <[EMAIL PROTECTED]> wrote: > On Thursday 12 June 2008, Warren Young wrote: > > Tim Johnson wrote: > > > Not sure what you mean by "directly usable". > > > > I mean "directly usable". :) > > > > > If I do an insert statement with a backslash, for example: > > > "headlin

Re: unescaping strings with the C api

2008-06-12 Thread Tim Johnson
On Thursday 12 June 2008, Warren Young wrote: > Tim Johnson wrote: > > Not sure what you mean by "directly usable". > > I mean "directly usable". :) > > > If I do an insert statement with a backslash, for example: > > "headline\one", I will retrieve "headline\\one", and that will > > need t

Re: unescaping strings with the C api

2008-06-12 Thread Warren Young
Tim Johnson wrote: Not sure what you mean by "directly usable". I mean "directly usable". :) If I do an insert statement with a backslash, for example: "headline\one", I will retrieve "headline\\one", and that will need to be unescaped, because it is not a true representation of wha

Re: unescaping strings with the C api

2008-06-12 Thread Tim Johnson
On Thursday 12 June 2008, Warren Young wrote: > Tim Johnson wrote: > > I can not locate a C api function to _unescape_ strings. > > Why do you believe you need one? > > You need to escape strings when building SQL query strings to avoid > problems with quote characters, which are special in SQL. W

Re: unescaping strings with the C api

2008-06-12 Thread Warren Young
Tim Johnson wrote: I can not locate a C api function to _unescape_ strings. Why do you believe you need one? You need to escape strings when building SQL query strings to avoid problems with quote characters, which are special in SQL. When MySQL returns the queried data to your program, i