Topic: ASC/DESC on 'fun' / 'ord' NOT WORKING
$result = get_prodlist();
$cols = array(
'id'=>'skip',
_("Sr.No.")=>array('align'=>'center','ord'=>''),
_("Name")=>array('align'=>'center'),
_("Wgh")=>array('align'=>'center'),
_("p1")=>array('align'=>'center'),
_("p2")=>array('align'=>'center'),
_("p1+p2")=>array('align'=>'center','fun'=>'sumplp2','ord'=>'')
);
$table =&new_db_pager('prodtable', $result, $cols, 'prodtable','id',10);
$table->width = "99%";
display_db_pager($table);
-----BELOW IS FUNCTION -------
function sumplp2($row){
$p1 = $row['p1'];
$p2 = $row['p2'];
$totalp1p2 = $p1 + $p2 ;
return $totalp1p2 ;
}
THAT COLUMN DONT DO ASC/DESC - ordering .... any solution why function 'ord' column are not working for asc/desc