Hi, I have some pages of type Booking Event for calendar, and I have a repeater to render them. I would like to be able to filter out the events by adding @fromdate@ and @todate@ query strings to the URL, in a way that the repeater only fetches items with start date in that range. Here is how I've filled the @WHERE@ field of the repeater:
{% QueryString.fromdate != @@ ? @EventDate @='@ + SQLEscape(QueryString.fromdate) + @'@ : @@ + QueryString.todate != @@ ? @ and EventDate @='@ + SQLEscape(QueryString.todate) + @'@ : @@ #%}It's supposed to build a T-SQL WHERE clause like this (if the query string parameters are available):
WHERE eventdate @='2018-8-1' and eventdate @='2018-9-20'This doesn't work, but still adding that where clause with the syntax above to a direct SELECT over the table works fine.Anyone knows the issue? I guess it's related to how I'm concatenating two parts of the clause, maybe '+' doesn't work in macro expressions?! Thanks.
↧