View Single Post
Old 06-13-2010, 01:30 PM   #2 (permalink)
maeltar
The Acquainted
 
Join Date: Nov 2009
Location: nr Stratford-Upon-Avon
Posts: 137
Thanks: 3
maeltar is on a distinguished road
Default

Got it sorted out and thought would post the sql in case anyone else comes across this sort of issue...

Code:
$sql = "select av_bookedid as 'accom_unavail', av_datestart , av_dateend from av_bookings where  av_confirmed !=0 
	AND 
	(av_datestart < '$av_reqdatestart' AND av_dateend >= '$av_reqdatestart') 
	AND 
	(av_datestart <= '$av_reqdateend' AND av_dateend >= '$av_reqdateend') 
	OR 
	(av_datestart >= '$av_reqdatestart'  AND av_dateend <= '$av_reqdateend')";
__________________
Thanks... Simon

Sex, Drugs & Linux Rules

Last edited by maeltar : 06-13-2010 at 01:30 PM. Reason: bbcode added
Send a message via MSN to maeltar
maeltar is offline  
Reply With Quote