Welcome Guest, Not a member yet? Register   Sign In
Help with CI active record and like statement
#1

[eluser]CroNiX[/eluser]
Using active record, is it possible to generate a like statement like this (using 'LOWER' in the where)? Or should I just query using my own sql statement?

SELECT name FROM users WHERE LOWER(name) LIKE '$some_var%';

Ive been doing:
Code:
return $this->db->select('name')
                ->like('name', $search_name, 'after')
                ->get('users')
                ->result_array();
Thanks,
CroNiX


Messages In This Thread
Help with CI active record and like statement - by El Forum - 09-10-2009, 02:15 PM
Help with CI active record and like statement - by El Forum - 09-10-2009, 08:07 PM
Help with CI active record and like statement - by El Forum - 09-10-2009, 09:01 PM
Help with CI active record and like statement - by El Forum - 09-10-2009, 10:10 PM
Help with CI active record and like statement - by El Forum - 09-10-2009, 10:12 PM
Help with CI active record and like statement - by El Forum - 09-11-2009, 05:44 AM



Theme © iAndrew 2016 - Forum software by © MyBB