bluedollar
Programmer
I am using mysql with PHP and I want to do the following:
select timetable_id
from timetable
where location_id = '.location_id.'
intersect
select timetable_id
from timetable
where start_date between '.$startdate.' and '.$enddate.'
or end_date between '.$startdate.' and '.$enddate.'";
Anything between '..' are elements on my form.
The query above is coming up with an error, so I guess that mysql does not support intersects yet. Is there a way of acheiving the above without using an intersect?
Any help would be greatly appreciated.
Thanks
Dan
select timetable_id
from timetable
where location_id = '.location_id.'
intersect
select timetable_id
from timetable
where start_date between '.$startdate.' and '.$enddate.'
or end_date between '.$startdate.' and '.$enddate.'";
Anything between '..' are elements on my form.
The query above is coming up with an error, so I guess that mysql does not support intersects yet. Is there a way of acheiving the above without using an intersect?
Any help would be greatly appreciated.
Thanks
Dan