Seth Northrop writes:
> >
> > You are possibly not escaping binary fields. You should use
> > mysql_escape_string() function on binary objects prior to inserting it
> > in the INSERT command, or use load_file() function.
> >
> 
> Thanks Sinisa for the reply!
> 
> There really isn't any binary data.. and, we are calling
> mysql_escape_string.. here is the snippet of code:
> 
> And, as I mentioned, if I do something like:
> 
> bin/mysql <-u & -p> <database> < foo.sql
> 
> where foo.sql contains the query checked for sanity the exact same result
> occurs.
> 
> 

At a small glance, your code looks OK. Try looking at resulting string
sql in gdb or just print it out to stdout. That might catch your bug.

I noted however that you forgot to quote string constants !!

MySQL commands lenghts are limited only by max_allowed_packet, which
can be extended up to 16 Mb in 3.23 and 4 Gb in 4.0.

As you are coding in C++, try using MySQL++. You can use streams
tehre, so you do not have to think about possible errors you have made
in sprintf(). You can also use quote and escape manipulators for
easier programming.


-- 
Regards,
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Mr. Sinisa Milivojevic <[EMAIL PROTECTED]>
 / /|_/ / // /\ \/ /_/ / /__   MySQL AB, FullTime Developer
/_/  /_/\_, /___/\___\_\___/   Larnaca, Cyprus
       <___/   www.mysql.com

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to