<--- --------------------------------------------------------------------------------------- ---- Blog Entry: Oh Baby, It's So Hot When You Paginate! (aka Paginating Results In ColdFusion) Author: Ben Nadel / Kinky Solutions Link: http://www.bennadel.com/index.cfm?dax=blog:281.view Date Posted: Sep 21, 2006 at 1:21 PM ---- --------------------------------------------------------------------------------------- ---> SELECT b.id, b.name, b.date_posted, b.time_posted, b.description, b.content, ( SELECT COUNT(*) FROM blog_comment c WHERE c.blog_entry_id = b.id ) AS comment_count, d.is_viewable FROM blog_entry b INNER JOIN display_status d ON ( b.display_status_id = d.id AND ( 1 = 0 OR b.id = ) ) ORDER BY ( CASE WHEN b.id = THEN ELSE 0 END ) ASC