number of threads from 24h
duhol Offline
Junior Member
**
Posts: 34
Joined: Mar 2011
Post: #5
RE: number of threads from 24h
i have something like this, but it give me new threads from midnight Ouch

PHP Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
		$last_dateline = 0;
		$start_dateline = TIME_NOW-(60*60*24*30);
		$end_dateline = TIME_NOW;

	
	$query = $db->simple_select("stats", "*", "dateline >= '".intval($start_dateline)."' AND dateline <= '".intval($end_dateline)."'", array('order_by' => 'dateline', 'order_dir' => 'asc'));
	while($stat = $db->fetch_array($query))
	{
		if($last_dateline)
		{
			$stat['change_threads'] = ($stat['numthreads'] - $stats[$last_dateline]['numthreads']);
			$threads_a_day = my_number_format($stat['change_threads']);
		}
		$stats[$stat['dateline']] = $stat;
		
		$last_dateline = $stat['dateline'];
	}

10-09-2011 05:50 PM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

Messages In This Thread
number of threads from 24h - duhol - 10-09-2011, 03:48 AM
RE: number of threads from 24h - RateU - 10-09-2011, 05:20 AM
RE: number of threads from 24h - duhol - 10-09-2011, 08:00 AM
RE: number of threads from 24h - duhol - 10-09-2011 05:50 PM
RE: number of threads from 24h - RateU - 10-10-2011, 01:26 AM
RE: number of threads from 24h - duhol - 10-11-2011, 03:16 AM
RE: number of threads from 24h - RateU - 10-11-2011, 03:54 AM
RE: number of threads from 24h - duhol - 10-13-2011, 05:51 AM
RE: number of threads from 24h - RateU - 10-13-2011, 07:44 AM

 Standard Tools
Forum Jump: