How do I build a LIKE query with DbCommand/Query Builder? I'm trying to construct a fairly simple LIKE query using the Query Builder, and I'm struggling. Here's the SQL that I want:

SELECT `id` FROM `craft_somecustomtable` WHERE ((`somecolumn` LIKE '%foo%') OR (`somecolumn` LIKE '%bar%'))


I've ran the above query in Sequel, with results.

For the Query Builder, here's what I've got so far:

$query = craft()-&gt;db-&gt;createCommand();
$query-&gt;select('id');
$query-&gt;from('somecustomtable');
$query-&gt;orWhere(array(
    'somecolumn' =&gt; 'LIKE %foo%',
));
$query-&gt;orWhere(array(
    'somecolumn' =&gt; 'LIKE %bar%',
));


This produces the following query, which obviously doesn't work as intended:

SELECT `id` FROM `craft_somecustomtable` WHERE ((`somecolumn`='LIKE %foo%') OR (`somecolumn`='LIKE %bar%'))


I've also tried adding the LIKE directive like this:

$query-&gt;orWhere(array(
    'somecolumn LIKE' =&gt; '%bar%',
));


This produces an error, however.
Just before posting the question, I had the good mind to read the Yii CDbCommand docs again, and I figured this out myself:

$query-&gt;orWhere(array(
    'like',
    'somecolumn',
    '%foo%'
));