mirror of
https://github.com/RaspbianFrance/raspisms.git
synced 2025-04-21 00:46:27 +02:00
Improve dashboard stats to show sended sms status stats
This commit is contained in:
parent
552300a971
commit
4e80a6a3a1
5 changed files with 288 additions and 199 deletions
|
@ -222,14 +222,14 @@ namespace models;
|
|||
*
|
||||
* @return array
|
||||
*/
|
||||
public function count_by_day_since_for_user($id_user, $date)
|
||||
public function count_by_day_and_status_since_for_user($id_user, $date)
|
||||
{
|
||||
$query = "
|
||||
SELECT COUNT(id) as nb, DATE_FORMAT(at, '%Y-%m-%d') as at_ymd
|
||||
SELECT COUNT(id) as nb, status, DATE_FORMAT(at, '%Y-%m-%d') as at_ymd
|
||||
FROM sended
|
||||
WHERE at > :date
|
||||
AND id_user = :id_user
|
||||
GROUP BY at_ymd
|
||||
GROUP BY at_ymd, status
|
||||
";
|
||||
|
||||
$params = [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue