$query = "SELECT * FROM comp_group where group_id = $id";
$sth = $adb->prepare($query);
if($sth)
{
$res = $sth->execute();
$numRows = $sth->rows();
PRINT "
";
for ($i = 0; $i < $numRows; $i++)
{
$result = $sth->fetchrow_hash();
$comp_id = $result["comp_id"];
$q2 = "SELECT ID,name FROM computers WHERE (ID = $comp_id)";
$sth2 = $adb->prepare($q2);
if($sth2)
{
$res2 = $sth2->execute();
$result2 = $sth2->fetchrow_hash();
$cname = $result2["name"];
} else
{
PRINT "Could not prepare query: ".$sth2->errstr."
\n";
}
PRINT "$cname | [Delete] |
\n";
}
PRINT "
";
} else
{
PRINT "Could not prepare query: ".$sth->errstr."
\n";
}
?>