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

[eluser]Sudz[/eluser]
Post the error you are getting.
#12

[eluser]Bigil Michael[/eluser]
i didn't get error

it is working

not getting the correct result
#13

[eluser]Bigil Michael[/eluser]
Quote:if($search!=‘all’){
$this->db->like('heading', $search);
}
$this->db->where('(cat_id = '.(int)$category.' OR subcat_id = '.(int)$category.')', NULL, FALSE);
$this->db->where('featured', 1);
$this->db->where('status', 1);

i echoed the query and run it on my sql
there also it shows 0 values
#14

[eluser]Sudz[/eluser]
Ok,then Post your query,
Is there matching record in your database table
#15

[eluser]Bigil Michael[/eluser]
i solved my problem using this code
Quote:if($search!=‘all’){
$this->db->like('heading', $search);
}
$this->db->where('(cat_id = '.(int)$category.' OR subcat_id = '.(int)$category.')', NULL, FALSE);
$this->db->where('featured', 1);
$this->db->where('status', 1);

thanks to everyone




Theme © iAndrew 2016 - Forum software by © MyBB