You are here: Re: creating image database « PHP Language « IT news, forums, messages
Re: creating image database

Posted by Arjen on 07/01/07 10:32

Gufo Rosso wrote:
> "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

Im not quite sure what you are saying here but you can just as easilly
secure an image with php as with mysql. Use readfile() and apache
redirect (img/(.+).jpg checkimg.php?img=$1)

checkimg.php
if($userhasacces($user))
{
readfile($img);
}
else
{
exit;
}

No need to bother mysql with this stuff :-)

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация