Is there any way to execute a query like:
INSERT INTO table1 (id, name) (SELECT id, concat(a, <img src='http://www.yiiframework.com/forum/public/style_emoticons/default/cool.gif' class='bbc_emoticon' alt='B)' /> as name FROM table2);
with the classical CDbCommand interface?
I’ve tried some variants of
$res = Yii::app()->db->createCommand() ->insert('table1', 'id, name') ->select('id, name') // Ommited the concat part for simplicity ->from('table2') ->where('1') ->execute();
But none of them have worked in any way
I am trying to insert some columns of a table in another, just to have a fulltext index separated from the main table, and update it once in a while.
I think I will have to do it querying the database directly…
Thanks in advance!