thank you for the quick reply
ok hopefully this helps
what i want to do is keep a tally of all the different "p" results with their mrc totals within an array. If I have 50 different "p" results, I'd need 50 arrays with "p" and the p mrc totals.
$query = "SELECT p.id,c.mrc,c.p from p,c where p.id=c.p";
while ($db->next_record()) {
if (p.id=3) {
$mrc3 = ($mrc + $mrc3);
}
if (p.id=4) {
$mrc4 = ($mrc + $mrc4);
}
}
print "result for 3";
print $mrc3;
print "result for 4";
print $mrc4;
Does that help?