Re: Images in a table

2003-12-01 Thread Peter Burden
Richard Bewley wrote: Yes, you can insert the binary into a table. Richard -Original Message- From: Zenzo [mailto:[EMAIL PROTECTED] Sent: Saturday, November 29, 2003 1:42 PM To: MySQL List Subject: Images in a table If your application is WWW based I've done some notes for students

Re: Images in a table

2003-12-01 Thread Zenzo
I would be pleased. Thanks Glenn Stauffer [EMAIL PROTECTED] wrote: 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/ I can send you some simple code to do

Re: Images in a table

2003-12-01 Thread Mickael Bailly
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

Re: Images in a table

2003-12-01 Thread colbey
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

RE: Images in a table

2003-11-29 Thread Richard Bewley
Yes, you can insert the binary into a table. Richard -Original Message- From: Zenzo [mailto:[EMAIL PROTECTED] Sent: Saturday, November 29, 2003 1:42 PM To: MySQL List Subject: Images in a table How can I insert images in a table if I can do it with MySQL?