Open GoogleCodeExporter opened 8 years ago
I think one of the contributors to this problem is incorrect error handling in
dbReservation.php.
Here is an example of error handling code in this script
$result = mysql_query($query);
if(mysql_num_rows($result)< 1)
{
echo mysql_error()." >>>Unable to retrieve from Room Reservation Activity table. <br>";
mysql_close();
return false;
}
This basically says if we retrieve no rows, to treat it as a database error.
But that isn't an error - it is often an expected result. If no rows are
retrieved, it simply means there are no rows for those dates. I think the
database function should simply return an empty reservation list, and let the
calling script handle the case of no rows being retrieved in whatever way makes
sense.
However, right now this is not a high priority fix. It is ugly but we can live
with it. The report logic should be fixed to detect the date being in the
future.
Original comment by bkmackellar
on 2 Dec 2012 at 8:43
Original issue reported on code.google.com by
bkmackellar
on 2 Dec 2012 at 8:28Attachments: