List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:April 26 2002 8:48pm
Subject:Re: mysql_real_query and escaping a semicolon
View as plain text  
At 14:37 -0600 4/26/02, Anna Fowles-Winkler wrote:
>Well, the function is called like this:
>
>mysql_real_query( mysql_connection, query_string, strlen( query_string ));
>
>Wouldn't that pass the correct length?

Not necessarily.

>
>--Anna
>
>Paul DuBois wrote:
>
>>  At 14:03 -0600 4/26/02, Anna Fowles-Winkler wrote:
>>  >Hi,
>>  >
>>  >I have an insert command that I'm executing through the C API function
>>  >mysql_real_query.  One of my values is a string like this:
>>  >'1;'
>>  >
>>  >When mysql_real_query sees the ;, it thinks it's the end of the
>>  >statement.
>>
>>  That's unlikely.  I'd guess that you're passing a value for the
>>  query length parameter that's too low.
>>
>>  >   How can I prevent that from happening?  Is there a way to
>>  >escape it?
>>  >
>>  >Thanks very much,
>>  >Anna
>  > >awinkler@stripped

Thread
mysql_real_query and escaping a semicolonAnna Fowles-Winkler26 Apr
  • Re: mysql_real_query and escaping a semicolonPaul DuBois26 Apr
  • Re: mysql_real_query and escaping a semicolonAnna Fowles-Winkler26 Apr
    • Re: mysql_real_query and escaping a semicolonPaul DuBois26 Apr
  • Re: mysql_real_query and escaping a semicolonAnna Fowles-Winkler26 Apr
    • Re: mysql_real_query and escaping a semicolonPaul DuBois26 Apr
  • Re: mysql_real_query and escaping a semicolonAnna Fowles-Winkler26 Apr
  • Re: mysql_real_query and escaping a semicolonAnna Fowles-Winkler26 Apr
  • Re: mysql_real_query and escaping a semicolonGerald Clark29 Apr
  • Re: mysql_real_query and escaping a semicolonAnna Fowles-Winkler29 Apr
    • Re: mysql_real_query and escaping a semicolonPaul DuBois29 Apr
  • Re: mysql_real_query and escaping a semicolonAnna Fowles-Winkler29 Apr
    • Re: mysql_real_query and escaping a semicolonMichael Widenius30 Apr