Gossamer Forum
Home : Products : DBMan : Customization :

HOW TO SORT REULTS

Quote Reply
HOW TO SORT REULTS
Is there a way to sort the results of a "list all" search?

i would like to sort by "price" or "date-entered", etc.

thanks in advance!

bob
Quote Reply
Re: [bobmc213] HOW TO SORT REULTS In reply to
http://www.gossamer-threads.com/...DBMan/FAQ/index.html
Quote Reply
Re: [bobmc213] HOW TO SORT REULTS In reply to
I find it easiest to make a global variable for the sort field and sort order and define it within my .cfg file.

$sort_field ='4'; ### sort by title
$sortorder = 'ascend';

Then in your html.pl in the following subs:

sub html_view_search
sub html_view_failure

you could also add to:

sub html_delete_search
sub html_modify_search

You can just add this to the forms:

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

This and many more tips and tricks are available in the FAQ noted below.

Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/