I'm currently finishing off writing an availability search.
Everything is working apart from my final SQL statement.
Basically I have a table named pricing1, which contains price_id, id, week, price
I am trying to search through for villa's available over a number of dates which are fixed in weekly periods.
At present the SQL I am trying to execute is:
SELECT * FROM villas, pricing1 WHERE villas.resort = 'pollenca' AND villas.beds LIKE '%%' AND pricing1.week = '03-01-04' AND pricing1.week = '17-01-04' AND pricing1.price != '0' AND villas.id = pricing1.id
This does not return any searches although if I search another way it returns results e.g:
SELECT * FROM villas, pricing1 WHERE villas.resort = 'pollenca' AND villas.beds LIKE '%%' AND pricing1.week = '03-01-04' AND pricing1.price != '0' AND villas.id = pricing1.id
I know their is a bug in the top code fragment but I'm struggling with this at the moment. Anyone??
I thought by using AND to search under the two dates, this would be sufficient?