develooper Front page | perl.beginners | Postings from July 2010

Example code for storing picture in MySQL DB

Thread Next
From:
Mimi Cafe
Date:
July 21, 2010 20:48
Subject:
Example code for storing picture in MySQL DB
Message ID:
AANLkTilLrf8y98Fe3FO2zRbwLd3EHbu3_dO41M4WdlZL@mail.gmail.com
Anyone worked on a project where they have stored pictures in MySQL db from
Perl program?  I need to store pictures in MYSQL and my initial thought was
a normal insert statement. Now I did a bit of search and people are making
it completed out there. I have not tried it, but I was thinking of grabbing
my picture and inserting into the table using a normal SQL insert like:

 $dbh->do(qq{insert into mytable (id, pic) values(1,$pic_file_name)});


Any experience on this?

Regards


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About