somebody kindly help me understand why my query below is not working. What i want to achieve is to do away with rooms in between the two dates(dates i am getting them from a form). Any time i make a booking with similar dates as the previous one, I still get the room in my options list. $records = mysqli_query($con, "SELECT DISTINCT TRoom FROM roombook WHERE not cin >= '$checkin' AND cout <= '$checkout' "); Continue reading...