I have two tables, the first one I query like :

$query = "SELECT * FROM xp_topics WHERE artist_count='artist' AND topictext LIKE 
          'B%' ORDER BY artist_count DESC limit 0,5"; $req = mysql_query($query); 
          $res = mysql_num_rows($req); if ($res == 0) { echo "</p>
          <p><b>Sorry there is no result.</b>";} else { while($row = 
mysql_fetch_array($req)) 
            { extract($row); echo ("$topictext<br>
            "); } } 

The second one I want to do a count for each one that was returned above. eg Billie 
(2) , Bill (4) Bret (1)........
 How would I set up the query to do both?

Reply via email to