Re: mysql_real_query, insert floats as binary

2002-07-02 Thread Roger Baklund
* Dave Beck > > ...and some bytes may represent an 'illegal' character, and thus must be > > escaped by a backslash... this goes for the quote character you > > use (" or '), the backslash character itself, and null bytes. > > Thanks, if I use mysql_real_query is this still the case? The doc's on

Re: mysql_real_query, insert floats as binary

2002-07-02 Thread Dave Beck
> ...and some bytes may represent an 'illegal' character, and thus must be > escaped by a backslash... this goes for the quote character you use (" or > '), the backslash character itself, and null bytes. Thanks, if I use mysql_real_query is this still the case? -- David A. C. Beck [EMAIL PROTEC

Re: mysql_real_query, insert floats as binary

2002-07-02 Thread Roger Baklund
* Dave Beck [...] > > charinsert_format[] = "INSERT INTO %s VALUES (%hhd%hhd%hhd%hhd, > > %hhd%hhd%hhd%hhd, %hhd%hhd%hhd%hhd, %hhd%hhd%hhd%hhd,%hhd%hhd%hhd%hhd)"; The values should be quoted... > > int build_real_insert(char *query, char *table, int frame, int > atom, float > > x, float

Re: mysql_real_query, insert floats as binary

2002-07-01 Thread Dave Beck
No takers? Any thoughts would be great. -- David A. C. Beck [EMAIL PROTECTED] Valerie Daggett Laboratory Biomolecular Structure and Design Program Department of Medicinal Chemistry University of Washington, Seattle On Thu, 27 Jun 2002, Dave Beck wrote: > the question: > > I am trying to use

mysql_real_query, insert floats as binary

2002-06-27 Thread Dave Beck
the question: I am trying to use the C API to insert floating (4 byte) point data into a mysql table. It is very desirable to put the data in as the binary representation and not as a sprintf family converted string (to maintain precision & improve performance). My initial attempt is below - pe