I am using the statement below to pull columns out of the database. The last value in the SELECT clause is a SUM(widgets). Can I use this statement for this value ? If so how do I reference it?
select orig_loc_cd, dest_loc_cd, SUM($widgets) from phx_activity
group by orig_loc_cd
for($i=0;OCIFetchinto($stmt,&$row,OCI_ASSOC); $i++)
{
print "$row[ORIG_LOC_CD]</TD>\n";
print "$row[DEST_LOC_CD]</TD>\n";
print "$row[?????????]</TD>\n";
}
select orig_loc_cd, dest_loc_cd, SUM($widgets) from phx_activity
group by orig_loc_cd
for($i=0;OCIFetchinto($stmt,&$row,OCI_ASSOC); $i++)
{
print "$row[ORIG_LOC_CD]</TD>\n";
print "$row[DEST_LOC_CD]</TD>\n";
print "$row[?????????]</TD>\n";
}