Welcome Guest, Not a member yet? Register   Sign In
Running Where Clause with Like Not Working
#5

(04-18-2023, 09:59 AM)demyr Wrote: Try sth like this:


Code:
$builder = $db->table('contractors');
        $builder->like('contractor_id', $inputText);
        $builder->orLike('ccontact', $inputText);
        $builder->where('ccompanyId', $companyId);

     

use the "where" option in the end and start with like.
Thanks Demry. I tried this it still ignores the where clause irrespective of its position. This query returns contractor like it should but from all companies. I want it to search and return contractors associated with that company only.
Reply


Messages In This Thread
RE: Running Where Clause with Like Not Working - by remesses_thegreat - 04-18-2023, 11:44 AM



Theme © iAndrew 2016 - Forum software by © MyBB