mvdkleijn
User
| Posts: 41 |   |

|
Small update to rating.php (v1.16) - 2007/05/14 08:31
Hi,
I made a couple of small changes to the code in rating.php, see below:
Changes: $current_rank = db_value("select rank from certificates where cert_id='$id'");
if ($current_rank != false)
return db_value("select cert_id from certificates where rank >='$current_rank' and scheme = '$target_scheme' order by rank limit 1");
Updated code:
| Code: |
function get_nearest_cert_in_scheme($id, $target_scheme= '')
{
if ( $target_scheme == '')
$target_scheme = get_rating_scheme_name();
$current_rank = db_value("select rank from certificates where cert_id='$id'");
if ($current_rank != false)
return db_value("select cert_id from certificates where rank >='$current_rank' and scheme = '$target_scheme' order
by rank limit 1");
else
return false;
}
|
Yours, mvdkleijn
Player: Pinnacle ShowCenter 1000 (wired) Server: Ubuntu Dapper LTS |