Gossamer Forum
Home : Products : DBMan : Discussions :

Whats New - What's New sort order

Quote Reply
Whats New - What's New sort order
Hi all

I have the What's New mod installed and working well, however how I would like to sort the results with the most recent added at the top of the list as at present all records added on the same day do not seem to sort by date(time). ( PS I am pulling the records in via SSI)

I have tried adding
&$db_key=*&so=descend&sb=0
into by virtual SSI call, thinking that the key field would be the best place to start ..but without any joy - infact it does not touch the results with ascend or descend selected.

I think that this may be to do with the hard coding of the order within the db.cgi by this part of the mod
this is under sub query

# Added by PJO for Whats new START

if($in{'listnew'}) {
$days = 6; # Number of days for What's New, +1.
$new = &get_date(time() - ($days * 86400));

# Change Date below to match the *exact* name of your date field.
$in{'Date-gt'} = $new;

# Change 2 below to match the number of your date field.
$in{'sb'} = 2; # Number of your date field

$in{'so'} = 'descend';
}

i.e. the script is sorting once already and I cannot therefore sort by another field.

Is there a way of either sorting 'by time by date' or including the key field sort in there somewhere.

Thanks all


Quote Reply
Re: Whats New - What's New sort order In reply to
In Reply To:
I have the What's New mod installed and working well, however how I would like to sort the results with the most recent added at the top of the list as at present all records added on the same day do not seem to sort by date(time). ( PS I am pulling the records in via SSI)
Have it sort by your unique record identifier ie: ID so for instance if ID is field #1 you would :
Code:
sb=1&so=descend
easy does it