Could someone please help me find the cause of the error I describe below, and also perhaps tell me why even though I have $db_debug = 0; I still get the error displayed.
As always, many thanks for your time.
--------------------------------------
I am using a relational database.
I have two users registered.
When I:
Search by User
http://www.marscafe.com/cgi-bin/dbman/famrecipes/db.cgi?db=user&uid=mars.11647109173802&UserID=arco&view_records=View+Records
OR
List All Users
http://www.marscafe.com/cgi-bin/dbman/famrecipes/db.cgi?db=user&uid=mars.11647109173802&view_records=1&sb=2&so=ascend&UserID=*&nh=1&mh=1
I get the following error message displayed (even though I have $db_debug = 0; in both the use.cfg and item.cfg files)
- but Only when I select the earliest user registered (chronologically) in the list
CGI ERROR
==========================================
Error Message : fatal error: Undefined subroutine in sort at db.cgi line 855.
FROM db.cgi (line 855 begins with foreach $hit)
# Sort the array @hits in order if we are meant to sort.
if (exists $in{'sb'}) { # Sort hits on $in{'sb'} field.
my ($sort_order, $sort_func);
$in{'so'} ? ($sort_order = $in{'so'}) : ($sort_order = "ascend");
$sort_func = "$db_sort{$db_cols[$in{'sb'}]}_$sort_order";
foreach $hit (sort $sort_func (keys %sortby)) {
$first = ($hit * $#db_cols) + $hit; $last = ($hit * $#db_cols) + $#db_cols + $hit;
push (@sortedhits, @hits[$first .. $last]);
}
@hits = @sortedhits;
}
As always, many thanks for your time.
--------------------------------------
I am using a relational database.
I have two users registered.
When I:
Search by User
http://www.marscafe.com/cgi-bin/dbman/famrecipes/db.cgi?db=user&uid=mars.11647109173802&UserID=arco&view_records=View+Records
OR
List All Users
http://www.marscafe.com/cgi-bin/dbman/famrecipes/db.cgi?db=user&uid=mars.11647109173802&view_records=1&sb=2&so=ascend&UserID=*&nh=1&mh=1
I get the following error message displayed (even though I have $db_debug = 0; in both the use.cfg and item.cfg files)
- but Only when I select the earliest user registered (chronologically) in the list
CGI ERROR
==========================================
Error Message : fatal error: Undefined subroutine in sort at db.cgi line 855.
FROM db.cgi (line 855 begins with foreach $hit)
# Sort the array @hits in order if we are meant to sort.
if (exists $in{'sb'}) { # Sort hits on $in{'sb'} field.
my ($sort_order, $sort_func);
$in{'so'} ? ($sort_order = $in{'so'}) : ($sort_order = "ascend");
$sort_func = "$db_sort{$db_cols[$in{'sb'}]}_$sort_order";
foreach $hit (sort $sort_func (keys %sortby)) {
$first = ($hit * $#db_cols) + $hit; $last = ($hit * $#db_cols) + $#db_cols + $hit;
push (@sortedhits, @hits[$first .. $last]);
}
@hits = @sortedhits;
}