Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $content_article = array();
- $query = db_query("SELECT *, max( hit_count ) AS ht FROM `tnf_track_click` WHERE article_type = 'News' AND last_clicktime >= ( %s ) GROUP BY article_title ORDER BY ht DESC", (time()-86400));
- while ($records = db_fetch_array($query)) {
- foreach ( $records as $key => $value ) {
- $temp[$records['ht']][$key] = $value;
- $content_article = $content_article+$temp;
- }
- }echo 'Count1 : '.count($content_article).'<br>';
- $query = db_query("SELECT *, count(*) as ht FROM `tnf_node_view_count` where last_clicktime >= ( %s ) group by node_id order by ht DESC", (time()-86400));
- while ($records = db_fetch_array($query)) {
- foreach ( $records as $key => $value ) {
- $temp[$records['ht']][$key] = $value;
- $content_article = $content_article+$temp;
- }
- }echo 'Count2 : '.count($content_article).'<br>';
- // Sort array on the basis of hit count.
- $content_article= krsort($content_article);
Advertisement
Add Comment
Please, Sign In to add comment