in this case, for example,
i have string from array of person_code => 1,2,3
then i want change that string to another string from array of person_nama => name1, name2, name3
i have try with my code :
public function Person_name($person_code)
{
$code= explode(',', $person_code);
$name=array();
for($i=0; $i<count($code); $i++){
$sql= Yii::app()->db->createCommand('select nm_person from tbl_person where kd_person="'.$code[$i].'";');
$name=$sql->queryRow();
}
$namearray= implode(',',$name);
return $namaarray;
}
but that result is only return the last person name in array,
anyone can help me?? thank you
$name[] =, push continually, and why not just use aWHERE INclause, i'm sureYiialready has that somewhere, use the API, that accepts aWHERE INclause method and also that accepts an array of integers