This works...

Code:
$sql = "
UPDATE checkin
SET che_sum=TIME_TO_SEC(TIMEDIFF(che_time_out,che_time_in))
";
nuRunQuery($sql);
This doesn't work...

Code:
$sql = "
UPDATE checkin
SET che_sum=SUM(TIME_TO_SEC(TIMEDIFF(che_time_out,che_time_in))/60)
";
nuRunQuery($sql);
This query works in phpmyadmin

Code:
UPDATE checkin
SET che_sum=SUM(TIME_TO_SEC(TIMEDIFF(che_time_out,che_time_in))/60)
Can anyone give me a clue as to what to look at, the error code is:

SQLSTATE[HY000]: General error: 1111 Invalid use of group function

Really appreciate any help you can give.

Craig