Hello.
This is a frequently asked question. Search in Google and in the archives at: http://lists.mysql.com/mysql Pay attention to the mysql_real_escape and LOAD_FILE. See: http://dev.mysql.com/doc/mysql/en/mysql-real-escape-string.html http://dev.mysql.com/doc/mysql/en/string-functions.html http://www.devarticles.com/c/a/MySQL/MySQL-and-BLOBs/ http://www.onlamp.com/pub/a/php/2000/09/15/php_mysql.html "Logg, Connie A." <[EMAIL PROTECTED]> wrote: > I would like to save graphs in a mysql data base. The table definition I = > have set up is: > > CREATE TABLE `GRAPHS` ( > `graphid` int(11) NOT NULL auto_increment,=20 > `graphic` blob, `f_time_stamp` timestamp NOT NULL default = > CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,=20 > PRIMARY KEY (`graphid`) > ) ENGINE=3DInnoDB DEFAULT CHARSET=3Dlatin1=20 > > And I have allocated the user account the "file" privilege. > > The sql I am trying to use is: > > load data infile 'filename.png' into table GRAPHS (graphic); > > What happens is that the takes the file and breaks it up into lines and = > loads each "line" as a row, thus storing it over many columns.=20 > > How can I get it to store the file in the 'graphic' blob with one = > 'graphid'. > > > Thanks in advance. > > Connie Logg, Network Analyst > Stanford Linear Accelerator Center > ph: 650-926-2879=20 > "Happiness is found along the way, not at the end of the road, and 'IF' = > is the middle word in life." > -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.NET http://www.ensita.net/ __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Gleb Paharenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.NET <___/ www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]