I have made an application for call management and want to show month wise report of an employee. So far I was thinking about GROUP BY but it fetches only last report.

Piece of my code is:
PHP Code:
$select mysql_query("SELECT  
                                        call_mngmt_emp_code = '"
                                        call_mngmt_on_field IN ( 'On Field', 'Holiday' )  
                                        call_mngmt_dr_code = '"
                                GROUP BY 
$row mysql_fetch_array($select)){ 
"<td>"; echo(date('d'strtotime($row['call_mngmt_date'])));  
If I run the query in phpmyadmin, I am still getting last result.And it shows as follows:

Dr. Name|Oct|Nov
ABC|16| 22

But I want result like

Table structure is very simple. Doctor name and call dates are inserted in database along with some other info.

Plus, another problem is, if there is no record in database, <td> is not printing. I tried if(!mysql_num_rows($sel)){ "<td>&nbsp;</td>";} in while loop. but no luck!

Can anyone please guide me in this regard?