Using Field Data in Query
Posted: Sun Nov 27, 2005 3:43 pm
I am trying to use the field pc from the Query below in an update query later in my script. How do I do I refer to the field pc?
Thanks,
Matt
Code: Select all
$query = "SELECT sum(cmp) as pc FROM $weeklydb_table WHERE id = $id AND year = $year AND wk < $wk ";
$result = @mysql_query($query);
if ($result == false)
{
echo "No Data";
}
# echo $result;
echo pc;Matt