If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Link to file (zip, jpg)

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-29-11, 08:23
sgotenka sgotenka is offline
Registered User
 
Join Date: Apr 2011
Posts: 1
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
Reply With Quote
  #2 (permalink)  
Old 04-30-11, 05:05
it-iss.com it-iss.com is offline
Registered User
 
Join Date: Sep 2009
Location: San Sebastian, Spain
Posts: 620
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
Senior Oracle/MySQL DBA
http://www.it-iss.com
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On