I am migrating from mysql to mysqli, and I am having trouble returning more than one row from the database in a query.
$db = new mysqli($hostname, $sql_us, $
$arr = array(); if ($type == 'assoc') { while($row = $result->fetch_assoc()) { $arr[] = $row; } } else { while($row = $result->fetch_object()) { $arr[] = $row; } } return $arr;