vendredi 27 janvier 2017

Rand(Min, Mx) Undefined Variable

Hi I have the following code:

private function doPreEventStart($user) {
    $row = db_fetch_item("SELECT resultid FROM ResultPackage 
        where ResultPackage.slotid like '%{$this->curSlotId}'
        and ResultPackage.PackageID like '%{$user->packageid}%'
        ORDER BY resultid desc LIMIT 1");
    $this->MaxResult = $row['resultid'];


$row = db_fetch_item("SELECT resultid FROM ResultPackage 
    where ResultPackage.slotid like '%{$this->curSlotId}'
    and ResultPackage.PackageID like '%{$user->packageid}%'
    ORDER BY resultid asc LIMIT 1");
$this->MinResult = $row['resultid'];

$this->curResultId = rand($MinResult,$MaxResult);
}

But I am getting this error:

PHP Notice: Undefined variable: MinResult in /var/www/html/betserver.php on line 539 PHP Notice: Undefined variable: MaxResult in /var/www/html/betserver.php on line 539

Please help




Aucun commentaire:

Enregistrer un commentaire