View Single Post
Old 12-07-2007, 09:36 PM   #2 (permalink)
Karl
The Reckoner
Advanced Programmer Top Contributor 
 
Karl's Avatar
 
Join Date: Sep 2007
Posts: 437
Thanks: 22
Karl is on a distinguished road
Default

Hey

1. Yeh that looks fine.

2. You can use mysql_result to return the first column of the first row in the result set.

Example:

PHP Code:
$pResult mysql_query("select count(*) from games where catid = '" $row['id'] ."'");
$iCount mysql_result($pResult0); 
__________________
Any fool can write code that a computer can understand. Good programmers write code that humans can understand.
Karl is offline  
Reply With Quote