-1

I have array output and I want use the out to get another output from database this my query:

$access_array = array(2,3,4);

foreach($access_array as $val){
        $index_erp = "id,name,alias,images";    
        $where_erp = "WHERE glb_pmstr_app_id = '2' and id = '".$val."'";
        $RES_SQL = $this->SQL_Query->__Select($index_erp,$tbl_app_feature,null,$where_erp,null,null,SQL_FETCHALL); 
}

and I was supposed to get 3 rows from the result of $RES_SQL, but I just get 1 rows from database.

How to solve this?

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
febri it
  • 27
  • 5

1 Answers1

0
$access_array = array(2,3,4);
$output = array();

foreach($access_array as $val){
    $index_erp = "id,name,alias,images";    
    $where_erp = "WHERE glb_pmstr_app_id = '2' and id = '".$val."'";
    $RES_SQL = $this->SQL_Query->__Select($index_erp,$tbl_app_feature,null,$where_erp,null,null,SQL_FETCHALL);
    $ouput[] =  $RES_SQL;
}

Is this what you're trying to do?

rapidoodle
  • 340
  • 1
  • 3
  • 23