Hello, there is a normal loop, displays the name and id
$ res = mysql_query ("SELECT id, name FROM Manufacturer WHERE Checked = 1 ORDER BY name");
while ($row = mysql_fetch_array($res)) { printf ("<li><a href='/manufacturer.php?id=%s'>%s</a>",$row['id'],$row['name']); }
How to make a check that would output those manufacturers where there are goods, and within the sql cycle did a request for the existence of goods? Already a very large load on the site turned out. Is there a more effective solution?