Afficher un message
Vieux 26/06/2007, 00h10   #5
Gufo Rosso
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: creating image database


"Arjen" <dont@mail.me> ha scritto nel messaggio
news:f5o3jj$5tp$1@brutus.eur.nl...
> Kevin Raleigh wrote:
> > I would like to create an image db so that I can store images and then
> > dynamically load


> > them into a slide show according to which file folder the image was

stored
> > in.
> > Can anyone advise on what fields I might need to create in the mySQL db

for
> > these
> > images? Suggestions on best practices? Pointers to examples of said

scripts?
>
>
> Best practice: dont use a database to store images. Just store image
> references and metadata.
> id int(8), name varchar(20), alt varchar(255), folder varchar(20) should
> do :-)


not 100 %
your photo in identify card, passport ,driver's license
photo is necessary ....... (500 kb is big resolution image in this case)


security access data


>
> If you want to speed things up al little and make your query safer dont
> use folder and image names but give them a number int(3), int(8) .. or
> use the id. And put an index on the folder. If you descide to use
> numbered folders try something like $myfolder = intval($_GET['folder']);
>


this solution is very good to other use
web
immage gallery (big photo)
video
flash .......
any file
..pdf



> $sql = "SELECT * FROM IMAGES WHERE folder ='$myfolder'";
>
> //
>
> foreach ($images as $image)
> {
> echo '<img src="/path/to/img/'.$myfolder.'/'.$image['id'].'.jpg"
> alt="'.$image['alt'].'" />';
> }
>
> --
> Arjen
> www.baby-namen.org (nog lang niet af)



  Réponse avec citation
 
Page generated in 0,08616 seconds with 9 queries