Re: [PHP-DB] Site Map and Page-o-mation

[email protected] (Chris)
Newsgroups php.db
Message-ID <[email protected]>
Ron Piggott wrote:
> This doesn't take into account the page - o - mation though.
> 
> The query that determines which up to 18 images display on the
> thumbnails page is:
> 
> SELECT * FROM photo_gallery_category INNER JOIN photo_gallery_index ON
> photo_gallery_index.photo_gallery_category_reference =
> photo_gallery_category.reference WHERE
> photo_gallery_category.category_name = '$photo_gallery_category' ORDER
> BY photo_gallery_index.filename ASC LIMIT " . ( ($page*18) -18) . " , 18
> 
> I see where you are coming from Chris.  What I need to know is from the
> 18 images which has the most recent last_update value.  I need the site
> map to match what is being displayed on the thumbnails page.

You can order by two fields.

order by filename asc, last_update_time desc limit ...

-- 
Postgresql & php tutorials
http://www.designmagick.com/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.