Re: mysql_real_query and escaping a semicolon

2002-04-30 Thread Michael Widenius
Hi! > "Anna" == Anna Fowles-Winkler <[EMAIL PROTECTED]> writes: Anna> I removed the semicolon from the end of the query string, and I still get the Anna> same syntax error: Anna> You have an error in your SQL syntax near ''.1' at line 10 Anna> This is what the query looks like: Anna> INSE

Re: mysql_real_query and escaping a semicolon

2002-04-29 Thread Anna Fowles-Winkler
I removed the semicolon from the end of the query string, and I still get the same syntax error: You have an error in your SQL syntax near ''.1' at line 10 This is what the query looks like: INSERT INTO micromodels (name, revision, dynamic, m_class, novars, equation, min_0, min_1, min_2, min_3

Re: mysql_real_query and escaping a semicolon

2002-04-29 Thread Paul DuBois
At 8:37 -0600 4/29/02, Anna Fowles-Winkler wrote: >Gerald Clark wrote: > >> The semicolon does not belong there. > >Where? At the end of the query or in the string? > >--Anna At the end. Semicolons are perfectly legal in data values (which is why this whole episode seems odd), but you don't pu

Re: mysql_real_query and escaping a semicolon

2002-04-29 Thread Anna Fowles-Winkler
Gerald Clark wrote: > The semicolon does not belong there. Where? At the end of the query or in the string? --Anna > > > Anna Fowles-Winkler wrote: > > >Anna Fowles-Winkler wrote: > > > >>Paul DuBois wrote: > >> > Paul DuBois wrote: > > > At 14:37 -0600 4/26/02, Anna Fowles-Winkl

Re: mysql_real_query and escaping a semicolon

2002-04-29 Thread Gerald Clark
The semicolon does not belong there. Anna Fowles-Winkler wrote: >Anna Fowles-Winkler wrote: > >>Paul DuBois wrote: >> Paul DuBois wrote: > At 14:37 -0600 4/26/02, Anna Fowles-Winkler wrote: > >Well, the function is called like this: > > > >mysql_real_query( mysql_connec

Re: mysql_real_query and escaping a semicolon

2002-04-26 Thread Anna Fowles-Winkler
Anna Fowles-Winkler wrote: > Paul DuBois wrote: > > > >Paul DuBois wrote: > > > > > >> 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 )); > > >> > > > >

Re: mysql_real_query and escaping a semicolon

2002-04-26 Thread Anna Fowles-Winkler
Paul DuBois wrote: > >Paul DuBois wrote: > > > >> 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? > >>

Re: mysql_real_query and escaping a semicolon

2002-04-26 Thread Paul DuBois
>Paul DuBois wrote: > >> 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. > >Uhm... why no

Re: mysql_real_query and escaping a semicolon

2002-04-26 Thread Anna Fowles-Winkler
Paul DuBois wrote: > 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. Uhm... why not? Wouldn't strlen

Re: mysql_real_query and escaping a semicolon

2002-04-26 Thread Paul DuBois
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

Re: mysql_real_query and escaping a semicolon

2002-04-26 Thread Anna Fowles-Winkler
Well, the function is called like this: mysql_real_query( mysql_connection, query_string, strlen( query_string )); Wouldn't that pass the correct length? --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 th

Re: mysql_real_query and escaping a semicolon

2002-04-26 Thread Paul DuBois
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

mysql_real_query and escaping a semicolon

2002-04-26 Thread Anna Fowles-Winkler
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. How can I prevent that from happening? Is there a way to escape it? Thanks very