mirror of
https://github.com/nerzhul/ocsms.git
synced 2025-06-08 00:16:24 +00:00
Prepare another query
This commit is contained in:
parent
0bac525826
commit
8a0580e7c4
@ -183,6 +183,19 @@ class SmsMapper extends Mapper {
|
|||||||
$query = \OCP\DB::prepare('SELECT sms_address, sms_date, sms_msg, sms_type, sms_mailbox FROM ' .
|
$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);
|
'*PREFIX*ocsms_smsdatas WHERE user_id = ? AND sms_date > ? ORDER BY sms_date', (int) $limit);
|
||||||
$result = $query->execute(array($userId, $start));
|
$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()) {
|
while ($row = $result->fetchRow()) {
|
||||||
$messageList[$row["sms_date"]] = array(
|
$messageList[$row["sms_date"]] = array(
|
||||||
"address" => $row["sms_address"],
|
"address" => $row["sms_address"],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user