Re: How to insert picture(.jpe) into mysql database?
Thanks for your help. I got a program about this subjust,but this program write in PHP with mysql.: mysql database: "CREATE TABLE binary_data ( id INT(4) NOT NULL AUTO_INCREMENT PRIMARY KEY,description CHAR(50), bin_data LONGBLOB, filename CHAR(50), filesize CHAR(50), filetype CHAR(50));" - store.php3 ?> if ($submit) { MYSQL_CONNECT( "localhost", "root", "password"); mysql_select_db( "binary_data"); $data = "" "r"), filesize($form_data))); $result=MYSQL_QUERY( "INSERT INTO binary_data (description,bin_data,filename,filesize,filetype) VALUES ('$form_description','$data','$form_data_name','$form_data_size','$form_data_type')"); $id= mysql_insert_id(); print "This file has the following Database ID: $id"; MYSQL_CLOSE(); } else { ?> File Description:File to upload/store in database:} ?> - What is description,bin_data,filename,filesize,filetype?and how to get these imformaton from perl? Thank you very much. Ed Chester <[EMAIL PROTECTED]> wrote: In my opinion you have two choices: i) store the image in a binary BLOB fieldii) store a reference to a filename in a sensible text field, and actually store the image in your normal filesystemOf these, I absolutely recommend (ii) and think that (i) is a disastrous thing to do. It will lead to large server load, much slower DB performance, more interface problems, and very large data tables. I cannot think of a single good reason to actually store an image in a mysql database, but if you have one please do post it :) ed cDo You Yahoo!? 150万曲MP3疯狂搜,带您闯入音乐殿堂美女明星应有尽有,搜遍美图、艳图和酷图 1G就是1000兆,雅虎电邮自助扩容!___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: How to insert picture(.jpe) into mysql database?
Ed Chester wrote: In my opinion you have two choices: i) store the image in a binary BLOB field ii) store a reference to a filename in a sensible text field, and actually store the image in your normal filesystem Of these, I absolutely recommend (ii) and think that (i) is a disastrous thing to do. It will lead to large server load, much slower DB performance, more interface problems, and very large data tables. I cannot think of a single good reason to actually store an image in a mysql database, but if you have one please do post it :) maybe if you want easy portability - all you have to do is dump the db and you have the images as well i guess it depends on the performance you need. i don't know how much of a performance hit storing a few jpegs in a BLOB would actually... (i guess its different if you're storing millions..) j ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: How to insert picture(.jpe) into mysql database?
Please give me some examples,thanks.Ed Chester <[EMAIL PROTECTED]> wrote: In my opinion you have two choices: i) store the image in a binary BLOB fieldii) store a reference to a filename in a sensible text field, and actually store the image in your normal filesystemOf these, I absolutely recommend (ii) and think that (i) is a disastrous thing to do. It will lead to large server load, much slower DB performance, more interface problems, and very large data tables. I cannot think of a single good reason to actually store an image in a mysql database, but if you have one please do post it :) ed cDo You Yahoo!? 150万曲MP3疯狂搜,带您闯入音乐殿堂美女明星应有尽有,搜遍美图、艳图和酷图 1G就是1000兆,雅虎电邮自助扩容!___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: How to insert picture(.jpe) into mysql database?
In my opinion you have two choices: i) store the image in a binary BLOB field ii) store a reference to a filename in a sensible text field, and actually store the image in your normal filesystem Of these, I absolutely recommend (ii) and think that (i) is a disastrous thing to do. It will lead to large server load, much slower DB performance, more interface problems, and very large data tables. I cannot think of a single good reason to actually store an image in a mysql database, but if you have one please do post it :) ed c ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
How to insert picture(.jpe) into mysql database?
I want to manage picture via mysql database,but how to insert picture into mysql database via perl?Please give me any perl progarm code,thanks.Do You Yahoo!? 150万曲MP3疯狂搜,带您闯入音乐殿堂美女明星应有尽有,搜遍美图、艳图和酷图 1G就是1000兆,雅虎电邮自助扩容!___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs