/** * This function is used to insert the site hit count * * * @return string */ function setCount() { $ip = Core_CHitCounter::getRealIpAddr(); $sql = "select * from site_hit_counter_table where ip_address='" . $ip . "' and date(visited_on)='" . date("Y-m-d") . "'"; $query = new Bin_Query(); $query->executeQuery($sql); if (empty($query->records)) { $sql = "insert into site_hit_counter_table (ip_address,visited_on) values('" . $ip . "','" . date("y.m.d H.i.s") . "')"; $query = new Bin_Query(); $query->executeQuery($sql); } }