2

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 filed 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

  1. What kind of type field should i use? Varchar, text........

  2. Where should i store my file? In a generic folder c:\file or somewhere specific (inside apache folder or what else)

  3. What should I insert in the field when i create a record with myphpmyadmin: the path? c:\bla bla bla simply?

  4. Do I need other fields to menage later the file like the mime type or something else?

Thanks a lot

Rupesh Yadav
  • 12,096
  • 4
  • 53
  • 70
Sgotenks
  • 1,723
  • 4
  • 20
  • 34

1 Answers1

2

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

Community
  • 1
  • 1
AEMLoviji
  • 3,217
  • 9
  • 37
  • 61