This may not be the greatest way of going about it, but here's how I did it:
In
db.cgi:
Towards the top, near all the
elsif's, find the code that says:
Code:
elsif ((keys(%in) <= 2) ||
($in{'login'})) { &html_home; }
else { &html_unkown_action; }
Replace
&html_home; with
&view_records;.
Then under
sub view_records { add the following code:
$in{'Type'} = (($in{'Type'}) ? $in{'Type'} : 'Link' );
$in{'sb'} = (($in{'sb'}) ? $in{'sb'} : '0' );
$in{'so'} = (($in{'so'}) ? $in{'so'} : 'descend' );
Take notes of the sections in bold:
In the first line, change all the "Type"s to the
field you want to "search" on. Then change "Link" to the
value you want to "search" on.
In the second line, change "0" to the field you want to sort on
And in the third line, change "descend" to the order you want search on.
In other words, the above would normally be achieved by the link:
<a href="$db_script_link_url&view_records=1&Type=Link&sb=0&so=descend"> Like I said before though... there could be a better way, if anyone knows of one, let us know
- Mark
Astro-Boy!!
http://www.zip.com.au/~astroboy/