* Thus wrote Craig Lonsbury ([EMAIL PROTECTED]):
> off the top of my head:
> 
> SELECT AVG(age), SUM(salTotal)
> FROM blah
> WHERE section = 3
> 
> i'm not sure if you can use the 2 functions in the same query,
> you might have to break it into 2 queries.

Yes you can.  And if you have other fields in the select you add a
group by to the sql statement

SELECT AVG(age), SUM(salTotal), otherfield
FROM blah
WHERE section = 3
group by otherfield

Assuming this is mysql:
  http://www.mysql.com/doc/en/GROUP-BY-Functions.html


Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to