misterx
04-09-2004, 10:59 PM
If you insist on storing the actual image file in the database ( I recommend against it) then make sure you set the datatype to BLOB.
As to your earlier question it can't really be explained better with a sample script. All you need to do is insert strings (varchar datatype) into the database. The strings you store will be the file name and the path to the image ie. ( "image.jpg" and "/home/images/" ). You would store the actual image file in some directory. All you store in the database is the information necessary to find the image.
I don't know how I could possibly explain that any more clearly.
__________________
Spookster
Moderator PHP Forum
All Hail Spookster
I have a question about this particular method. In storing strings with references to the location of the image file, would you have seperate columns for path and file name? If so, why? I'm curious as to if there is any benefit to having seperate path and file name columns as opposed to simply having one column which just stores the path with the filename on the end.
Thanks.
As to your earlier question it can't really be explained better with a sample script. All you need to do is insert strings (varchar datatype) into the database. The strings you store will be the file name and the path to the image ie. ( "image.jpg" and "/home/images/" ). You would store the actual image file in some directory. All you store in the database is the information necessary to find the image.
I don't know how I could possibly explain that any more clearly.
__________________
Spookster
Moderator PHP Forum
All Hail Spookster
I have a question about this particular method. In storing strings with references to the location of the image file, would you have seperate columns for path and file name? If so, why? I'm curious as to if there is any benefit to having seperate path and file name columns as opposed to simply having one column which just stores the path with the filename on the end.
Thanks.