Welcome Guest, Not a member yet? Register   Sign In
Hit Counter in Post by ip address
#1

[eluser]anyamanggar[/eluser]
hello guys, i have question, please help me yaa ..

this my view detail for news

Code:
<div class="tekscontent">
&lt;?php $count = mysql_fetch_row(mysql_query("SELECT count FROM news")); ?&gt;
<div class="imgplace"><img class="imgdetail" src="&lt;?=$news_item['img_path']?&gt;" width="500" height="295" />
&lt;?=$news_item['caption']?&gt;</div>
<h1 class="judulberitadepan">&lt;?=$news_item['title']?&gt;</h1>
<h1 class="dateberita">&lt;?php echo indonesian_date(($news_item['date'])); ?&gt; Dilihat : &lt;?php print "$count[0]"; ?&gt; Kali</h1>
&lt;?=$news_item['text']?&gt;

</div>

news model
Code:
function get_news($slug = FALSE)
{

if ($slug === FALSE)
{
  $this->db->order_by('id','desc');
  $query = $this->db->get('news');
  return $query->result_array();
}
$query = $this->db->get_where('news', array('slug' => $slug));
return $query->row_array();
}

database :
id
title
slug
intro
text
count

with that code i have been work but not really work. Every post have the same count vor view even i have create post with the time over 10 mineute. please help thanks


Messages In This Thread
Hit Counter in Post by ip address - by El Forum - 08-10-2012, 01:13 AM
Hit Counter in Post by ip address - by El Forum - 08-10-2012, 04:28 AM
Hit Counter in Post by ip address - by El Forum - 08-10-2012, 04:56 AM
Hit Counter in Post by ip address - by El Forum - 08-10-2012, 05:03 AM
Hit Counter in Post by ip address - by El Forum - 08-14-2012, 08:01 PM
Hit Counter in Post by ip address - by El Forum - 08-15-2012, 01:38 AM
Hit Counter in Post by ip address - by El Forum - 08-15-2012, 02:49 AM



Theme © iAndrew 2016 - Forum software by © MyBB