Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/ocsms.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorLoic Blot <loic.blot@unix-experience.fr>2018-04-10 09:45:19 +0300
committerLoic Blot <loic.blot@unix-experience.fr>2018-04-10 09:45:19 +0300
commit8a0580e7c42906d74846e15b124c6a78cce9406b (patch)
tree5a4247ad02ebaf5aa565643949663f08f4670d1b /db
parent0bac525826c458a2f75cb3278bcd59d729d34b6e (diff)
Prepare another query
Diffstat (limited to 'db')
-rw-r--r--db/smsmapper.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/db/smsmapper.php b/db/smsmapper.php
index b022f41..e62edad 100644
--- a/db/smsmapper.php
+++ b/db/smsmapper.php
@@ -183,6 +183,19 @@ class SmsMapper extends Mapper {
$query = \OCP\DB::prepare('SELECT sms_address, sms_date, sms_msg, sms_type, sms_mailbox FROM ' .
'*PREFIX*ocsms_smsdatas WHERE user_id = ? AND sms_date > ? ORDER BY sms_date', (int) $limit);
$result = $query->execute(array($userId, $start));
+
+// $qb = $this->db->getQueryBuilder();
+// $qb->select('sms_address, sms_date, sms_msg, sms_type, sms_mailbox')
+// ->from('ocsms_smsdatas')
+// ->where($qb->expr()->andX(
+// $qb->expr()->eq('user_id', $qb->createNamedParameter($userId)),
+// $qb->expr()->gt('sms_date', $qb->createNamedParameter($start))
+// )
+// )
+// ->orderBy('sms_date');
+// $result = $qb->execute();
+// How to do limit ?
+
while ($row = $result->fetchRow()) {
$messageList[$row["sms_date"]] = array(
"address" => $row["sms_address"],