PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > macromedia.dyna.html > blob data
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
blob data

Réponse
 
LinkBack Outils de la discussion
Vieux 08/10/2008, 03h37   #1
web_rookie
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut blob data

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
  Réponse avec citation
Vieux 08/10/2008, 14h05   #2
David Powers
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: blob data

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/
  Réponse avec citation
Vieux 08/10/2008, 18h35   #3
web_rookie
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: blob data

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

  Réponse avec citation
Vieux 08/10/2008, 19h29   #4
David Powers
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: blob data

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/
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 07h56.


Édité par : vBulletin® version 3.7.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,08243 seconds with 12 queries