Are there advantages to saving file names in MySQL?
As opposed to saving just the image or song to folder.
alwaysinit
9:29 am on Oct 19, 2006 (gmt 0)
I am new to coding and was just wondering. Why do programmers put the file names of images, pics, and mp3's into the database as well as save it in a folder?
Could'nt they be called just as efficiently from the folder directly?
txbakers
10:48 am on Oct 19, 2006 (gmt 0)
If you put the file name in the DB, which I do, you can pull that name out of the DB dynamically and then create your links on the fly as well.
This system works great.
In one application, I have about 4000 people uploading files to my server, and with the names in the DB, it's very easy to retrieve their files for viewing.
alwaysinit
12:07 pm on Oct 19, 2006 (gmt 0)
So it is the better way to go for organization and structure. OK thanks, was just checking