how to stop empty group in php using mysql
i want to stop empty rows group
this code is showing like this
-----------------
                    <--- and this empty rows is showing empty group how to stop this
-----------------
UK
-----------------
UAE
-----------------
USA
-----------------
and i want like this
-----------------
UK
-----------------
UAE
-----------------
USA
-----------------
this is code
<?php
    mysql_connect('localhost', 'user', 'password.') or die (mysql_error());
    mysql_select_db('phone') or die (mysql_error());
    $result = mysql_query("SELECT * from topdata GROUP BY model");
    //While there are rows to display
    while($row = mysql_fetch_array($result)){
    //Display the results from the current row and a line break
     echo  "<li><a href=../model/".urlencode($row['model']).".html>" .$row['model']."</a></li>";
    }
    ?>
 
    