mysql - Help writing where portion of query in codeigniter -


i have query written using codeigniters active record class.

when query written looks like

where `account` = 1  , cgl.contactid null  , `firstname` 'm%'  or `lastname` 'm%' 

but need like

where `account` = 1  , cgl.contactid null  , (`firstname` 'm%'  or `lastname` 'm%') //notice brackets 

how can this?

$this->where(array('account' => 1, 'cgl.contactid' => null); $this->where(("firstname` 'm%' or `lastname` 'm%'")) 

Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -