i am trying to fetch result of a query that is in a loop but i cant get all the records returned by query that is in the loop please guide me.
$qry = '';
$qry = "SELECT
`user_id` FROM
`view_property_user_lab`";
$qry .= " WHERE property_id = '" . $propId . "'";
$result = $this->db->query($qry);
$result_count = $result->result_array();
foreach ($result_count as $row)
{
$user_name_qry = "SELECT
`name`
FROM USER
WHERE user_id = '" . $row['user_id'] . "'";
$user_name_result = $this->db->query($user_name_qry);
}
$result_count_user = $user_name_result->result_array();
print_r($result_count_user);
This is the dump of array
Array ( [0] => Array ( [name] => abc) )