PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Hi All
I've been struggling with this query for past 4days now see If anyone can help me please. A typical day's diary starts from 8am till 9pm, normally you would book an hr but just to test the script I booked 8am to 9pm so that means all day has been booked NO other booking can be taken for this day if I DO NOT select the varibles 8 & 9 IT WILL book again and again . ????? why why?????
Thanks Zed
$query = "SELECT b_id, COUNT(*) AS Cnt
FROM booking
WHERE request_date='$request_date'
AND e_time > '$s_time'
AND s_time < '$e_time'
GROUP BY b_id";
$result = mysql_query($query);
$row = mysql_fetch_assoc($result);
if($row['Cnt'] > 0){
error_message('Sorry, this time is already booked. Please choose another');
} else {