Active Record ->like doesn't take the 3rd option |
[eluser]Unknown[/eluser]
Per the CI doc (http://ellislab.com/codeigniter/user-gui...ecord.html), I was trying to generate something like: $this->db->like('name', $name, 'after'); it seems to ignores the 'after' (or 'before' for that matter) altogether. Upon examination of the code (db_active_record.php under the drivers folder), it seems that the AR 'like' isn't looking at the 3rd optional parameter at all. Is this a real bug or am I just seeing things? Thanks.
[eluser]Michael Wales[/eluser]
What version are you using? I am looking at 1.7.0 right now, the like() method calls _like(), which I have pasted below. It definitely takes the third parameter into account: Code: function like($field, $match = '', $side = 'both') If you are on 1.7.0, try using an array for your parameters as opposed to the strings.
[eluser]Unknown[/eluser]
ahhh. I was looking at someone else's code and it seem they're on 1.4.x. Sorry about this confusion. I'll update their version and then we should be good once again.
[eluser]Michael Wales[/eluser]
Yeah, this was added at 1.6.0 or 1.6.1 - changelog has the info. |
Welcome Guest, Not a member yet? Register Sign In |