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
|
@ -112,6 +112,35 @@ namespace models;
|
|||
|
||||
return $this->_run_query($query, $params);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return sendeds for an destination and a user since a date.
|
||||
*
|
||||
* @param int $id_user : User id
|
||||
* @param string $since : Date we want messages since
|
||||
* @param string $destination : Number who sent the message
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function gets_since_date_by_destination_and_user(int $id_user, string $since, string $destination)
|
||||
{
|
||||
$query = '
|
||||
SELECT *
|
||||
FROM sended
|
||||
WHERE id_user = :id_user
|
||||
AND destination = :destination
|
||||
AND at > :since
|
||||
';
|
||||
|
||||
$params = [
|
||||
'id_user' => $id_user,
|
||||
'destination' => $destination,
|
||||
'since' => $since,
|
||||
];
|
||||
|
||||
return $this->_run_query($query, $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return sended for an uid and an adapter.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue