Hi,
I need to execute a query with the following where clause:
where (arrival_date between :aDate and :bDate) or (departure_date between :aDate and :bDate)
I took the approach posted here:
http://modxcms.com/forums/index.php/topic,43716.msg261297.html#msg261297
and just wrote out the where clause and then prepared it with the actual values.
However, the resulting where clause for the query is now:
where (arrival_date between :'2011-01-01 and :'2011-01-07' or (departure_date between :'2011-01-01' and :'2011-01-07')
This gets flagged off with a syntax error when I use the query in phpmyadmin.
I’m not an SQL guru but the ":" look suspicious.
How can I solve this?
Thanks.