Welcome Guest, Not a member yet? Register   Sign In
problem in $this->db->or_where()
#1

[eluser]Bigil Michael[/eluser]
Quote:function get_ordinary_search($search, $category)
{
if($search!='all'){
$this->db->like('heading', $search);
}
$this->db->where('featured', '1');
$this->db->where('status', '1');
$this->db->where('cat_id', (int)$category);
$this->db->or_where('subcat_id', (int)$category);
$result_category_newss = $this->db->get('classifieds');
return $result_category_newss->result();
}
this is the model function i used to do search.
without $this->db->or_where('subcat_id', (int)$category);
it is working well

when i use the condition

$this->db->or_where('subcat_id', (int)$category);

it shows every fields in the table

can anyone help me???/
is there any syntax problem....

please reply
thanks in advance..


Messages In This Thread
problem in $this->db->or_where() - by El Forum - 05-03-2011, 06:01 AM
problem in $this->db->or_where() - by El Forum - 05-03-2011, 06:17 AM
problem in $this->db->or_where() - by El Forum - 05-03-2011, 06:25 AM
problem in $this->db->or_where() - by El Forum - 05-03-2011, 06:30 AM
problem in $this->db->or_where() - by El Forum - 05-03-2011, 06:33 AM
problem in $this->db->or_where() - by El Forum - 05-03-2011, 06:35 AM
problem in $this->db->or_where() - by El Forum - 05-03-2011, 06:40 AM
problem in $this->db->or_where() - by El Forum - 05-03-2011, 06:41 AM
problem in $this->db->or_where() - by El Forum - 05-03-2011, 06:45 AM
problem in $this->db->or_where() - by El Forum - 05-03-2011, 06:55 AM
problem in $this->db->or_where() - by El Forum - 05-03-2011, 06:57 AM
problem in $this->db->or_where() - by El Forum - 05-03-2011, 06:58 AM
problem in $this->db->or_where() - by El Forum - 05-03-2011, 07:00 AM
problem in $this->db->or_where() - by El Forum - 05-03-2011, 07:02 AM
problem in $this->db->or_where() - by El Forum - 05-03-2011, 07:08 AM



Theme © iAndrew 2016 - Forum software by © MyBB