php - what will be the query for the following? -


here sql 3 tables

create table `reservation` (   `cust_id` int(50) not null,   `reservation_id` int(25) not null,   `car_id` int(50) not null,   `total` varchar(50) not null,   `pulocation` varchar(50) not null,   `dolocation` varchar(50) not null,   `pudate` varchar(50) not null,   `dodate` varchar(50) not null,   `putime` varchar(25) not null,   `dotime` varchar(25) not null ) engine=innodb default charset=latin1;   create table `car` (   `car_id` int(25) not null auto_increment,   `car_name` varchar(50) not null,   `rental` varchar(50) not null,   `category` varchar(50) not null,   `category_id` varchar(10) not null,   `details` text not null,   `date_added` date not null,   `status` varchar(50) not null,   primary key  (`car_id`) ) engine=innodb default charset=latin1 auto_increment=34 ;    create table `customer` (   `cust_id` int(11) not null auto_increment,   `fname` varchar(50) not null,   `lname` varchar(50) not null,   `address` varchar(100) not null,   `city` varchar(50) not null,   `country` varchar(50) not null,   `zip` varchar(50) not null,   `dob` varchar(50) not null,   `email` varchar(50) not null,   `username` varchar(50) not null,   `password` varchar(50) not null,   primary key  (`cust_id`) ) engine=innodb default charset=latin1 auto_increment=7 ; 

cust_id , car_id foreign key car , customer table.so have write query check whether car available between pudate , dodate reservation table.any appreciated


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -