Mysql link to external resources: .zip an image file
I really need your help: I have installed easphp on my laptop (apache, php, mysql). I'm developing a db for mobile app (an online market)
I need to add a field that link an external file staying in a dir on my file system (cause now I'm working in locale).
I found some tutorial explaining how upload files into the db using the Blob type and MIME, but I would like my file staying in a folder and on the db have only some fields like, title, description, size, extension and one file开发者_开发问答d pointing to the file(the application .zip or some images .jpg in case i need some previews). I didn't find how to do that.
I don't have yet a php interface so I'm working only through phpmyadmin
What kind of type field should i use? Varchar, text........
Where should i store my file? In a generic folder c:\file or somewhere specific (inside apache folder or what else)
What should I insert in the field when i create a record with myphpmyadmin: the path? c:\bla bla bla simply?
Do I need other fields to menage later the file like the mime type or something else?
Thanks a lot
You can visit Uploading Files To MySQL Database
But it will be good if you store only path of the file in DB. And save file in directory.
Link is here upload file with php and save path to sql
First and third answers are useful
精彩评论