Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2011

    Unanswered: Link to file (zip, jpg)

    Hello everybody, i really need your help:i have installed easphp on my laptop (apache, php, mysql).
    I'm developping a db for mobile app (an online market)

    I need to add a field that ling an external file staying in a dir on my file system (caause now i'm working in locale).

    I found some tutoril explaininh 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 field 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 interfaace 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 whatelse)
    3)What shoul i insert in the field when i create a record with myphpmyadmin: the path? c:\bla bla bla
    4)Do i need other fields to menage the file like the mime type or something else?

    If you caan explain me or there are some useful link......

    Tnx a lot

  2. #2
    Join Date
    Sep 2009
    San Sebastian, Spain
    If you are not going to store the actual file in the database then you only need to store the full path to the file in the database. The rest of the fields is dependent on what you are going to do with the files, if you need the MIME type then this should be stored, if you need a description this should be added too.
    Ronan Cashell
    Certified Oracle DBA/Certified MySQL Expert (DBA & Cluster DBA)
    Follow me on Twitter

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts