What wrong with my query building function with operator "LIKE"?


            	$rawData = Yii::app()->db->createCommand()



                	->where(array('like','name',':name'), array(':name'=>'%'.$keyWord.'%'))


here is what I want to do in SQL query: SELECT * FROM company WHERE name LIKE …(the key word that user input)

Please pardon me if my question is too easy for you. I just couldn’t make it work, and I’ve read Query Builder Tutorials several times.

Many thanks from a beginner! [/size][/font]

Is binding parameters in LIKE condition possible in Query Builder?

I got it,

            	$rawData = Yii::app()->db->createCommand(array(

                	'select' => array('*'),

                	'from'=> 'company',





Thanks every one!