class.contractlisttable.php
* Sorts campaigns by efficiency
Code: Select all
189 usort($tbldata, array("ContractListTable", "cmpefficiency"));
190 // print_r($tbldata);
191 return $tbldata;
192 }
193
194 public static function cmpefficiency($a, $b)
195 {
196 if($a["efficiency"] == $b["efficiency"])
197 // < for DESC > for ASC
198 return ($a["name"] > $b["name"]) ? +1 : -1;
199 // < for DESC > for ASC
200 return ($a["efficiency"] < $b["efficiency"]) ? +1 : -1;
201 }