i need help in mysql like query |
how to write the direct mysql statement in CI model
for ex:- SELECT employeeNumber, lastName, firstName FROM employees WHERE (lastName LIKE '%B%' or firstName LIkE '%d%') and employeeNumber LIKE '%112%' and (Country LIKE '%US%' or Country LIkE '%UK%'); this statement is mysql formate how to write the same logic in the CI model, kindly i request to help me. thanking you
Please, have a look at the Database Reference in the CI documentation:
https://www.codeigniter.com/userguide3/d...eries.html For me, the Query Builder works great. Your query would be like this in Query Builder: PHP Code: public function get_employees() |
Welcome Guest, Not a member yet? Register Sign In |