Sorry you where right all along,
the problem was I had the start and end date stored as YYYY-MM-DD but the date entered from the form stored as YYYYMMDD without the '-' character
Thanks very much for all your help
Now I have another script written to find all events that occur between two dates,
the first date is entered and then the nxt number of days and the end date is calculated from this.
I can find all events which begins between these two dates by using:
$dbQuery = "SELECT * FROM Events WHERE EventDate between '$startDate' and '$endDate' ";
but how can I find events which may not begin but are occuring between these two dates I tried using
$dbQuery = "SELECT * FROM Events WHERE EventDate between '$startDate' and '$endDate' or".
"EventDate <= '$startDate' AND EventEndDate >='$endDate'";
but it doesn't work have you any ideas?
Thank-you