Index: openacs-4/packages/lars-blogger/www/blog-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/www/blog-postgresql.xql,v diff -u -N -r1.3.2.3 -r1.3.2.4 --- openacs-4/packages/lars-blogger/www/blog-postgresql.xql 13 Mar 2003 17:05:51 -0000 1.3.2.3 +++ openacs-4/packages/lars-blogger/www/blog-postgresql.xql 13 Jun 2003 09:15:01 -0000 1.3.2.4 @@ -3,31 +3,19 @@ postgresql7.1 - + date_trunc(:archive_interval, entry_date) = :archive_date - - - date_trunc(:archive_interval, entry_date) = :archive_date - - - entry_date > current_timestamp - interval '30 days' - - - limit 3 - - - - + select entry_id, to_char(entry_date, 'fmDayfm, Month fmDDfm, YYYY') as entry_date_pretty, @@ -40,6 +28,7 @@ draft_p, p.first_names as poster_first_names, p.last_name as poster_last_name, + o.creation_user as user_id, to_char(posted_date , 'HH24:MI') as posted_time_pretty, (select count(gc.comment_id) from general_comments gc, cr_revisions cr @@ -53,8 +42,38 @@ and draft_p = 'f' and deleted_p = 'f' order by entry_date desc, posted_date desc - $limit_clause + + + select entry_id, + to_char(entry_date, 'fmDayfm, Month fmDDfm, YYYY') as entry_date_pretty, + to_char(entry_date, 'YYYY/MM/DD/') as entry_archive_url, + to_char(entry_date, 'YYYY-MM-DD') as entry_date, + title, + content, + content_format, + draft_p, + p.first_names as poster_first_names, + p.last_name as poster_last_name, + o.creation_user as user_id, + to_char(posted_date , 'HH24:MI') as posted_time_pretty, + (select count(gc.comment_id) + from general_comments gc, cr_revisions cr + where gc.object_id = entry_id + and content_item__get_live_revision(gc.comment_id) = cr.revision_id) as num_comments + from users u, pinds_blog_entries e join + acs_objects o on (o.object_id = e.entry_id) join + persons p on (p.person_id = o.creation_user) + where package_id = :package_id + and u.user_id = o.creation_user + and u.screen_name = :screen_name + and $date_clause + and draft_p = 'f' + and deleted_p = 'f' + order by entry_date desc, posted_date desc + + +