#Add the aggregated columns...
$tags->selectAdd('max(notice_id) as last_notice_id');
if(common_config('db','type')=='pgsql') {
#Add the aggregated columns...
$tags->selectAdd('max(notice_id) as last_notice_id');
if(common_config('db','type')=='pgsql') {