This ensures the 0.00
will never cause you a problem.
if ($discDayRate == 0.00) { ## don't use quotes here; it should be saved as a DECIMAL or INT in the database
$the_rate = $dayRate; ## back to the default
}
else {
if ($discDayRate < $dayRate) {
$the_rate = $diskDayRate;
}
else {
$the_rate = $dayRate;
}
}
$the_rate
has your desired rate.