|
-
Jun 6th, 2002, 03:13 PM
#1
Thread Starter
Member
*SOLVED* - How to use a BLOB with PHP and MySQL
Hello all,
I would like to store a binary file (for example
a GIF file) in a MySQL database (BLOB field).
How can I get a file in MySQL with PHP and
how can I get it out again without altering
the file?
Any help is greatly appreciated.
Last edited by hdvb; Jun 7th, 2002 at 02:09 AM.
-
Jun 6th, 2002, 05:43 PM
#2
personally I would store the image in a directory and then the path in mysql.
let me check on this as I have never done it. I would think it is the same as anything else, but let me check
-
Jun 6th, 2002, 08:59 PM
#3
Stuck in the 80s
I have seen a tutorial on how to do this somewhere before, but I can't seem to find it now. I'll keep looking.
However, I do agree with scoutt that I'd put it in a directory somewhere and then possibly store the location of it in a database instead.
-
Jun 7th, 2002, 02:09 AM
#4
Thread Starter
Member
Thanks
Thank you both (scoutt and The Hobo) for the
reactions, however I found two articles on
www.phpbuilder.com which explained how to
use the blob field.
Scoutt, about your remark about storing just the
path to the image in a database, you might be
right. However, the GIF was just a sample. More
likely I will store other types of files in my DB,
files that may not be linked to directly from other
sites and so.
Anyway, thanks again.
-
Jun 7th, 2002, 07:53 AM
#5
I was just going to say that there is tutorials on phpbuilder to look at. although my suggestion was just that, a suggestion, you have to make the choice. but I will say that when you start ading pictures or other stuff in the blob field, you database will be getting big fast. jsut a side note if you interested.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|