• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
where is ignored when like is used

#1
[eluser]freshface[/eluser]
Hey

When i do something like this:
Code:
$prev_max = $this->db->select_max('slug')->like('slug',$slug,'after')->where('language_id',LANG_ID)->get('pages')->row()->slug;

The where is ignored, how can i solve this?

#2
[eluser]pistolPete[/eluser]
Are you sure the WHERE condition is not included in the generated SQL?
Please post the output of
Code:
echo ($this->db->last_query());

#3
[eluser]freshface[/eluser]
Found it, i applied the where on the wrong query.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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