angieluvboo
New Member
This my current code.\[code\]<?php$query_production ="SELECT uploadedby, uploaddate, count(uploadedby) as items, date_format(uploaddate,'%m-%d-%Y') as date FROM imsexport WHERE uploaddate between '2013-01-01' and '2013-01-03' GROUP BY uploadedby, date ORDER BY uploadedby";$production = mysql_query($query_production,$prepress) or die (mysql_error());$row_production = mysql_fetch_assoc($production);?><html><head><title>Untitled Document</title></head><body><table width="200" border="1"> <tr> <td>uploadedby</td> <td>uploaddate</td> <td>items</td> <td>date</td> </tr> <?php do {?> <tr> <td><?php echo $row_production['uploadedby']?></td> <td><?php echo $row_production['uploadedby']?></td> <td><?php echo $row_production['items']?></td> <td><?php echo $row_production['date']?></td> </tr>\[/code\] The resulting display is:\[code\] uploadedby uploaddate items dateAdonis Abiera 2013-01-01 08:03:00 64 01-01-2013Adonis Abiera 2013-01-02 05:30:00 46 01-02-2013Aileen Alina 2013-01-02 16:29:00 15 01-02-2013Aileen Mosende 2013-01-01 07:54:00 98 01-01-2013Aileen Mosende 2013-01-02 06:00:00 69 01-02-2013Ailyn Barnum 2013-01-01 09:21:00 84 01-01-2013Ailyn Barnum 2013-01-02 09:16:00 55 01-02-2013Alexander Dulay 2013-01-02 08:15:00 64 01-02-2013Alfredo Santiago 2013-01-01 08:02:00 79 01-01-2013Alfredo Santiago 2013-01-02 06:06:00 59 01-02-2013Analyn Reyes 2013-01-01 09:04:00 65 01-01-2013Analyn Reyes 2013-01-02 09:33:00 51 01-02-2013Andresito Muzones 2013-01-01 08:37:00 60 01-01-2013Andresito Muzones 2013-01-02 08:45:00 72 01-02-2013Angelica Domingo 2013-01-01 09:28:00 68 01-01-2013Angelica Domingo 2013-01-02 09:40:00 59 01-02-2013Arman Romanca 2013-01-01 09:23:00 73 01-01-2013Arman Romanca 2013-01-02 10:14:00 64 01-02-2013Don Feliciano 2013-01-01 09:13:00 70 01-01-2013Don Feliciano 2013-01-02 06:11:00 56 01-02-2013\[/code\]I want to display it like this:\[code\]uploadedby 01-01-2013 01-02-2013Adonis Abiera 64 46Aileen Alina 0 15Aileen Mosende 98 69Ailyn Barnum 84 55Alexander Dulay 0 64Alfredo Santiago 79 59Analyn Reyes 65 51...... and so on\[/code\]Note that there are certain records that may not exist for certain dates. ex(records for Aileen Alina and Alexander Dulay). Any ideas on how I could accomplish this?