summaryrefslogtreecommitdiff
path: root/app/php/sqlmap
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2016-03-15 23:59:33 +0100
committeremkael <emkael@tlen.pl>2016-03-15 23:59:33 +0100
commite509fc24d904831759071134361bef1503d4ff87 (patch)
treefe56ad530be0f4270a43f8c5715a326b67bdd249 /app/php/sqlmap
parent0c5ca745975b1929787ea55a2d936b8fbef4a38f (diff)
* facade for event list fetch
Diffstat (limited to 'app/php/sqlmap')
-rw-r--r--app/php/sqlmap/config.xml1
-rw-r--r--app/php/sqlmap/events.xml11
2 files changed, 12 insertions, 0 deletions
diff --git a/app/php/sqlmap/config.xml b/app/php/sqlmap/config.xml
index 7c213a3..101e1b7 100644
--- a/app/php/sqlmap/config.xml
+++ b/app/php/sqlmap/config.xml
@@ -4,5 +4,6 @@
<datasource ConnectionID="db" />
</provider>
<sqlMaps>
+ <sqlMap name="events" resource="events.xml" />
</sqlMaps>
</sqlMapConfig>
diff --git a/app/php/sqlmap/events.xml b/app/php/sqlmap/events.xml
new file mode 100644
index 0000000..5980b27
--- /dev/null
+++ b/app/php/sqlmap/events.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<sqlMapConfig>
+ <select id="getEvents" resultClass="Entry">
+ <![CDATA[
+ SELECT * FROM entries
+ WHERE end_date >= #date_from# AND begin_date <= #date_to#
+ AND $calendar_clause$
+ ORDER BY begin_date ASC;
+ ]]>
+ </select>
+</sqlMapConfig>