Cjuiautocomplete Help

I used CJuiAutoComplete and got the data from the db but I want to search the data details by clicking from the autocomplete list and go to the related view.

view.php

<?php

 &#036;this-&gt;widget('zii.widgets.jui.CJuiAutoComplete', array(


'name'=&gt;'Book',


'source'=&gt;&#036;this-&gt;createUrl('/site/autocompletetest'),


'options'=&gt;array(


    'minLength'=&gt;'2',


 ),


'htmlOptions'=&gt;array(


    'placeholder' =&gt; 'Search',


),

));

?>

controller.php

[font="Courier New"]public function actionAutocompleteTest() {

&#036;res =array();


&#036;result = array();


if (isset(&#036;_GET['term'])) {


	&#036;connection=Yii::app()-&gt;db;


	&#036;sql=&quot;Select name,id from book where name like :name or id like :name union select name,id from member where name like :name or id like :name&quot;;


	&#036;command =Yii::app()-&gt;db-&gt;createCommand(&#036;sql);


	&#036;command-&gt;bindValue(&quot;:name&quot;, '%'.&#036;_GET['term'].'%', PDO::PARAM_STR);


	&#036;res =&#036;command-&gt;queryAll();


if(&#33;empty(&#036;res))


	foreach(&#036;res as &#036;mres)


            {


                &#036;result[] = &#036;mres['name'];


				&#036;result[] = &#036;mres['id'];


            }


        echo CJSON::encode(&#036;result);  


		Yii::app()-&gt;end();


}

}[/font]

And I’m implementing this search on the menu bar for searching the books and memebers.

Please help me.Thankx.