mirror of
https://github.com/RaspbianFrance/raspisms.git
synced 2025-04-20 16:37:48 +02:00
highly improve discussion perfs + fix initial sound playing and erratic scrolling
This commit is contained in:
parent
48e8eacc34
commit
fb919ff59f
10 changed files with 242 additions and 28 deletions
|
@ -178,6 +178,34 @@ namespace models;
|
|||
|
||||
return $this->_run_query($query, $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return sendeds for an origin and a user since a date.
|
||||
*
|
||||
* @param int $id_user : User id
|
||||
* @param string $since : Date we want messages since
|
||||
* @param string $origin : Number who sent the message
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function gets_since_date_by_origin_and_user(int $id_user, string $since, string $origin)
|
||||
{
|
||||
$query = '
|
||||
SELECT *
|
||||
FROM received
|
||||
WHERE id_user = :id_user
|
||||
AND origin = :origin
|
||||
AND at > :since
|
||||
';
|
||||
|
||||
$params = [
|
||||
'id_user' => $id_user,
|
||||
'origin' => $origin,
|
||||
'since' => $since,
|
||||
];
|
||||
|
||||
return $this->_run_query($query, $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get number of sended SMS for every date since a date for a specific user.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue