Hi,
I'm trying to use the greater than or equal to, and less than or equal expressions in a piece of code, but i always seem to get a parse error, below is my code, i'd be greatful if someone code tell me whats wrong.
It seems to be the "if ($start_new..." line that is erroring
$sql="SELECT * FROM availability WHERE user_id='$sUserID' AND room_code='$sRoomcode'";
$result=db_query($sql);
if ($result) {
$old = mysql_fetch_array($result);
$row = mysql_fetch_row($result);
$start_old = $old['start_date'];
$end_old = $old['end_date'];
if ($row[0] == 0) {
echo 'Database Error';
} else {
if ($start_new <= $start_old && $end_new >= $start_old && $end_new <= $end_old) {
echo 'Update Needed';
} else {
echo 'No Update Needed';
}
}