I have an andWhere with the problem that it will not work using params
->andWhere('r.name LIKE"%:search%" OR r.street LIKE"%:search%" OR r.city LIKE"%:search%"', array(':search'=>$search))
it works if I do it like this
->andWhere('r.name LIKE"%'.$search.'%" OR r.street LIKE"%'.$search.'%" OR r.city LIKE"%'.$search.'%"')
Is there something wrong my parameterized code? I really rather do it this way for safety but can’t get it to work.