Hello,
I'm not sure if this is more an issue with PHP or MySQL. I have a piece of code that counts how many records on each date have a specific word. It works fine.
foreach($mysqli->query('SELECT DATE(`s_created_at`) , COUNT(*) FROM `tickets` where subject LIKE "%Word%" GROUP BY `s_created_at` order by s_created_at
DESC') as $row1)
{
echo $row1['s_created_at'];
echo " ";
echo $row1['COUNT(*)'];
}
So the output format is:
2022-05-16 3
2022-05-13 2
2022-05-12 3
2022-05-11 1
The one issue is that obviously it ignores all dates that don't have the word. I'd like the format to include this so it looks like:
2022-05-16 3
2022-05-15 0
2022-05-14 0
2022-05-13 2
2022-05-12 3
2022-05-11 1
Any ideas?
Thanks.