正如您在下面的代码中看到的那样,我正在使用->row()->$db_field;
. 我不知何故需要操纵它,这样我才能返回$db_field
并$db_field1
.
我需要做什么才能返回两行?
法典:
if ($query_country->num_rows() > 0)
{
return $query_country->row()->$db_field;
}
使用
return $query_country->result(); //return query result as object
或
return $query_country->result_array();//return query result as array