Jump to content

davidwhiteuk

New Members
  • Posts

    6
  • Joined

  • Last visited

Everything posted by davidwhiteuk

  1. I think this sounds like the way I'll need to go. I'll have to learn about arrays though. Thanks.
  2. Goes back about 3 years at the moment. Obviously this would increase over time.
  3. 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.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.