Page 1 of 1

Query

Posted: Thu Sep 13, 2007 1:28 am
by sandy1028
Hi,

How to fetch all the data from current timestamp to previous 24hours.

select avg(`network`) from `tablename` where `fieldname` > now()-(3600*24) where name='$centre';


Here all the average of 1 day value I am able to fetch.

But I want to fetch the data for each 10 mins data which is in database

Posted: Thu Sep 13, 2007 7:25 am
by feyd
Assuming you are using MySQL, http://dev.mysql.com/doc/refman/5.0/en/ ... tions.html has all the information you need.