Gossamer Forum
Home : Products : DBMan : Customization :

Sort on Date

Quote Reply
Sort on Date
I would like to print on screen sorted by date. I look fpr a simple system.
I have not understand the script default.cfg sort on. I think it is this
$db_key = 'datum_veranstaltung';

... but i can change and the print is not sorted.

You have a idea ?

In this Forum I have found a lot of information ... sort on, but all is with many configuration.

I search for a simple form, chance the standard sort to sort on a date field.

Thanks
Quote Reply
Re: [WernerW] Sort on Date In reply to
I work with the german date dd.mm.yyyy.
In the default.cgf the line is:
'datum_veranstaltung' => [3, 'alpha', 10, 255, 1, &get_date(), ''],
Is this correct or ist this line correct:
#'datum_veranstaltung' => [3, 'date', 12, 15, 1, &get_date, ''],

I can not change "alpha" with "date" witn no error.

My destination is sort the database to date. In the printscreen the first is near date from today.

The URL is only descend. I like ascend. I found not the right place in db.pl.

In this forum a lot of information to chance code, but it is not works.


default.cgf

$sort_field ='0'; ### sort order for this database
#$sortorder = 'descend'; ### last first
$sortorder = 'ascend'; ### first first


In html.pl

<input type=hidden name="sb" value="$sort_field">
<input type=hidden name="so" value="$sortorder">


When I search the database the Print is o.k.
When I "List all" the sort is wrong.


Thank you.