RE: [PHP] Feeling a bit brain dead, please help in maths: averages

2003-09-17 Thread Craig Lonsbury
> -Original Message- > From: Ryan A [mailto:[EMAIL PROTECTED] > Sent: Wednesday, September 17, 2003 3:21 PM > To: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: Re: [PHP] Feeling a bit brain dead, please help in maths: > averages > > > Hey, > Thanks for repl

Re: [PHP] Feeling a bit brain dead, please help in maths: averages

2003-09-17 Thread Curt Zirzow
* 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

Re: [PHP] Feeling a bit brain dead, please help in maths: averages

2003-09-17 Thread Ryan A
Hey, Thanks for replying. Actually I made that example simple, i actually need the average of 7 to 9 fieldsand i dont want to run 7 selects :-( I know its been done on elancebut how? Thanks, -Ryan > off the top of my head: > > SELECT AVG(age), SUM(salTotal) > FROM blah > WHERE section

RE: [PHP] Feeling a bit brain dead, please help in maths: averages

2003-09-17 Thread Craig Lonsbury
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. Craig -Original Message- From: Ryan A [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 17, 200