• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.