Almost at my wits end here
This is my table
Code mysql:CREATE TABLE IF NOT EXISTS booked ( id int(11) NOT NULL auto_increment, business_id int(11) NOT NULL, room_number varchar(25) NOT NULL, room_type varchar(99) NOT NULL, product_name varchar(32) NOT NULL, description text NOT NULL, check_in_date date NOT NULL, check_out_date date NOT NULL, actual_occupancy tinyint(4) NOT NULL, room_status varchar(16) NOT NULL, PRIMARY KEY (id), UNIQUE KEY business_id (business_id,room_number,check_in_date) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=53 ;
and I am running a query which works but for the not in clause
The query still return the results as if the not in clause was omitted. Can the b.room_number be returned, when it is not the PK? (Completely gone out of my head). Should I make the unique key into a primary key?