thanks for the help so far, im getting there.
theres something wrong there though, the totals arent showing at all.
here is the code i am using..
$sql = "SELECT m_employee, SUM(m_total) AS TOTAL FROM earnings GROUP BY m_employee";
$res = mysql_query($sql) or die("SQL error: ".mysql_error());
while ($row = mysql_fetch_assoc($res)) {
echo "Name: {$row['m_employee']} - Total: {$row['m_total']}<br>\n";
}
Here is the result
Name: John - Total:
Name: Shawn - Total:
Name: Matt - Total:
Sure Hope you guys can help, im stumped and never used the TOTAL or GROUP sql functions before.