I'm using the following to select from a table
$query = "SELECT item_name, mc_gross, completed, COUNT(*) FROM ipn_tblsaleshistory GROUP BY item_name";
$result = mysql_query($query)
or die("couldn't execute query");
...then...
while ($row = mysql_fetch_array($result)){
extract($row);
echo "<tr>";
echo"<td> $item_name </td>";
echo"<td> £ $mc_gross </td>";
echo" <td> $COUNT </td>";
echo"<td> $completed </td>";
echo "</tr>";
}
to display the results -
I can't seem to get the value of $COUNT
to display - what am I doing wrong?
TIA
best
- Rob