Be warned about hitting the default max_packet_size limitation of mysql which will cause large files to not insert.
This link shows another way to overcome that limitation: http://php.dreamwerx.net/forums/viewtopic.php?t=6 On Mon, 1 Dec 2003, Mickael Bailly wrote: > > > Here is a sample code in PHP: > > $image = file_get_contents('/tmp/my_image.png'); > $res = mysql_query('insert into img_table ( data ) values > (\''.addslashes($image).'\')'); > > > Works with a table like: > > create table img_table (bigint not null auto_increment primary key, data > LONGBLOB not null default ''); > > > Hopa that helps > > On Saturday 29 November 2003 19:41, Zenzo wrote: > > How can I insert images in a table if I can do it with MySQL? > > > > __________________________________ > > Do you Yahoo!? > > Free Pop-Up Blocker - Get it now > > http://companion.yahoo.com/ > > -- > Mickael Bailly > > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] > -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]