$query = "select c.catid, c.name, ( select count(v.id) from vendors v where v.catid = c.catid ) as num_vendors from category c order by c.name asc"; if ( $rsCat = mysql_query($query) ) { ?>
| Category ID | Category Name | Num Vendors |
|---|---|---|
| = $row["catid"]?> | = $row["name"]?> | = $row["num_vendors"]?> |
Could not retrieve categories.
= mysql_error()?>