|
|
|
#1 |
|
Messages: n/a
Hébergeur: |
hi
any simple tutorial to just add files to mysql, the very basic procedure to add a jpg. i can go from there tnx i dnt need a form i just want the jpg in that table and downloaded upon view |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
web_rookie wrote:
> i dnt need a form i just want the jpg in that table and downloaded upon view Storing images in database tables is generally not a good idea, because it causes bloated tables and fragmentation. Another problem is that you need a proxy script to display the image correctly, because the browser needs to know the correct MIME type. Without a proxy script you see just a stream of binary data. The normally recommended approach is to store the images in your normal file system, and store the details of the image (path, filename, etc) in the database. -- David Powers, Adobe Community Expert Author, "The Essential Guide to Dreamweaver CS3" (friends of ED) Author, "PHP Solutions" (friends of ED) http://foundationphp.com/ |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
ok so this will be my path to making the database, now may i ask where i can
see a procedure how to explain this, maybe a sample database. you mean the path must have a url link to the folder where the file is? the other info i dont need just the image path or pdf link. so in a table there is a field called file and what is it? blob? and how do i connect this table to the folder, what links it? i cant still see a clear picture, a tutorial may be good to read to understand many thanks |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
web_rookie wrote:
> so in a table there is a field called file and what is it? blob? No. You're simply storing text, so it's a VARCHAR column. > and how do i > connect this table to the folder, what links it? The code in your web page. <img src="images/<?php echo $row_recordsetName['file']; ?>" ... /> -- David Powers, Adobe Community Expert Author, "The Essential Guide to Dreamweaver CS3" (friends of ED) Author, "PHP Solutions" (friends of ED) http://foundationphp.com/ |
|
![]() |
| Outils de la discussion | |
|
|