For Programmers: Free Programming Magazines  


Home > Archive > PHP DB > April 2007 > Re: [PHP-DB] 20K photos









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: [PHP-DB] 20K photos
Niel Archer

2007-04-29, 6:58 pm

Hi

> Imagine that you want to put some 20000 historical photos On display in your website , you use PHP and MySQL.
> Preparing a photo album with 200 photos is no problem but for 20000 photos! would you do it in the same way?


Yes, but I don't necessarily see the need for a db.

If you have additional information on the pictures to store, then yes,
use a db. Otherwise all the info you need is available from the files.

For small numbers I wouldn't store the filenames in the db. For 20K, I
would.

Decide on how many images per page, then use SELECT with LIMIT to pull
out a page's worth of files and show the page. Back/Next tell the page
what offset to use for the LIMIT clause.


Niel
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com