Re: [PHP-DB] Averaging Numbers

2001-08-15 Thread Andre P.
Maybe I am missing the complexity but I would just add them all up as you retrieve them (or where you are printing them out) and then when you finish the loop divide the total by the number of of number you are averaging over have (i.e this would be 15 if you are taking 15 days). something

RE: [PHP-DB] Averaging Numbers

2001-08-15 Thread Jeff Oien
I'm real sorry to say I don't know the answer to your question unless there's a php function to get an average (or write one yourself) but you say you've managed to get a script/process to run in conjunction with your database every half an hour...how do you do this!? I've been wanting

Re: RE: [PHP-DB] Averaging Numbers

2001-08-15 Thread Russ Michell
I have a cron job that runs on a Unix server that runs a PHP file that gets a number from a Web site and inserts it into the database. Jeff Oien Oh nuts! I thought there may be some way for a script to tell itself to re-run over X-period of time or even have some kind of stored procedure

RE: [PHP-DB] Averaging Numbers

2001-08-15 Thread Jeff Oien
That's exactly what I needed. Thanks. I'm absolutely awful with math and this is my first time averaging numbers from a database. Jeff Oien Maybe I am missing the complexity but I would just add them all up as you retrieve them (or where you are printing them out) and then when you finish

RE: [PHP-DB] Averaging Numbers

2001-08-15 Thread Robert Klinkenberg
:Re: [PHP-DB] Averaging Numbers Maybe I am missing the complexity but I would just add them all up as you retrieve them (or where you are printing them out) and then when you finish the loop divide the total by the number of of number you are averaging over have (i.e this would be 15