yuttakarn Posted July 17, 2016 Share Posted July 17, 2016 Customers pick When finished If on the book, such as the selection of Van Dyke VT01 from 1/07/59 - 2/07/59-day period, you will not be able to book your car again. It is based on the availability of the vehicle. I made a separate table Storage booking Van table separately too. Tables, storage, booked by id_car I take from the table and put the van. Table of van This is the code that I defined it booked only three people per day. $date = "$rn_gostart"; //กำหนดค้นวันที่ $result = mysqli_query($mysqli,"select * from vn_rent where rn_gostart = '$date'"); $ckd = mysqli_num_rows($result); if($ckd >= 3){ $msg = "<div class='alert alert-danger'> <span class='glyphicon glyphicon-info-sign'></span> วันที่จองเต็มแล้ว </div>"; }else{ Sorry I am not good at English Please help me Link to comment Share on other sites More sharing options...
justsomeguy Posted July 18, 2016 Share Posted July 18, 2016 When someone selects the dates you need to look up in the database to see if the vehicle is already booked during any of those times. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now