Location: PHPKode > projects > PhpMyInventory > pmi281/detailed_p.php
<?
  Include("Includes/global.inc.php");
  checkPermissions(2, 1800);
  writeHeader("Count Peripherals");
?>
<TABLE border='0' cellpadding='4' cellspacing='0' width='450'>
  <tr class='title'>
    <td><b>Product</b></td>
    <td><b>Units</b></td>
    <td><b>Model</b></td>
    <td><b>Manufacturer</b></td>
  </tr>
<?
$strSQL = "SELECT count(p.pk_peripheral) as pCount, pt.description, pt.model, pt.manufacturer FROM
  peripherals as p, peripheral_types as pt WHERE pt.peripheral_pk=p.peripheral_fk AND
  pt.accountID=$accountID GROUP BY pt.model, pt.description ORDER BY description ASC";
$result = dbquery($strSQL);

While ($row = mysql_fetch_array($result)) {

  echo "<tr class='".alternateRowColor()."'>";
  echo "<td><font size='-1'>".$row["description"]."</font></td>";
  echo "<td><font size='-1'>&nbsp;".$row["pCount"]."</font></td>";
  echo "<td><font size='-1'>".$row["model"]."</font></td>";
  echo "<td><font size='-1'>".$row["manufacturer"]."</font></td>";
  echo "</tr>\n";
}

echo "</TABLE>";

writeFooter();
?>
Return current item: PhpMyInventory