Just uper validation true in codenitor
$query = $this->db->query(“SELECT receive_date,ip_address FROM wl_enquiry WHERE date='”.$this->config->item(‘config.date’).”‘ and ip_address='”.$this->input->post(‘ip_address’).”‘”);
$total=$query->num_rows();
$row=$query->result_array();
if($total==0)
{
your running code is hear
}