mirror of
https://github.com/nerzhul/ocsms.git
synced 2025-06-10 09:26:15 +00:00
Fix #55 issue. NOW() function doesn't work on all backends
This commit is contained in:
parent
ff3c3e58ef
commit
98933860e8
@ -263,12 +263,13 @@ class SmsMapper extends Mapper {
|
||||
$userId, (int) $sms["_id"]
|
||||
));
|
||||
}
|
||||
$now = date("Y-m-d H:i:s");
|
||||
$query = \OCP\DB::prepare('INSERT INTO *PREFIX*ocsms_smsdatas ' .
|
||||
'(user_id, added, lastmodified, sms_flags, sms_date, sms_id,' .
|
||||
'sms_address, sms_msg, sms_mailbox, sms_type) VALUES ' .
|
||||
'(?,?,?,?,?,?,?,?,?,?)');
|
||||
$result = $query->execute(array(
|
||||
$userId, "NOW()", "NOW()", $smsFlags,
|
||||
$userId, $now, $now, $smsFlags,
|
||||
$sms["date"], (int) $sms["_id"],
|
||||
$sms["address"], $sms["body"], (int) $sms["mbox"],
|
||||
(int) $sms["type"]
|
||||
|
Loading…
x
Reference in New Issue
Block a user