hi im doing a project on online table reseration. im using a table "reservation" to store the table details of reserved table
+--------------+-------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+--------------+-------------+------+-----+---------+----------------+
| reserve_id | int(15) | NO | PRI | NULL | auto_increment |
| member_id | int(15) | NO | | NULL | |
| table_id | int(15) | NO | | NULL | |
| reserve_date | date | NO | | NULL | |
| reserve_time | varchar(50) | YES | | NULL | |
+--------------+-------------+------+-----+---------+----------------+
these are the values inserted as the user tries to reserve
+------------+-----------+----------+--------------+--------------+
| reserve_id | member_id | table_id | reserve_date | reserve_time |
+------------+-----------+----------+--------------+--------------+
| 21 | 1 | 3 | 2014-05-01 | Lunch |
| 22 | 1 | 3 | 2014-05-01 | Lunch |
| 23 | 1 | 4 | 2014-05-01 | Dinner |
| 25 | 1 | 3 | 2014-02-02 | Lunch |
+------------+-----------+----------+--------------+--------------+
what i want is if the member id of 1, reserve table of id "3 " on date 1-05-2014 for lunch and if member id of "2" also tries to reserve it should nt be reserved how to do ?
hiiiiii@ 0 Junior Poster in Training
iamthwee
hiiiiii@ 0 Junior Poster in Training
diafol
hiiiiii@ 0 Junior Poster in Training
diafol
hiiiiii@ 0 Junior Poster in Training
urtrivedi 276 Nearly a Posting Virtuoso
hiiiiii@ 0 Junior Poster in Training
hiiiiii@ 0 Junior Poster in Training
diafol
hiiiiii@ 0 Junior Poster in Training
hiiiiii@ 0 Junior Poster in Training
diafol
hiiiiii@ 0 Junior Poster in Training
diafol
hiiiiii@ 0 Junior Poster in Training
diafol
hiiiiii@ 0 Junior Poster in Training
diafol
hiiiiii@ 0 Junior Poster in Training
hiiiiii@ 0 Junior Poster in Training
diafol
hiiiiii@ 0 Junior Poster in Training
diafol
hiiiiii@ 0 Junior Poster in Training
diafol
hiiiiii@ 0 Junior Poster in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.