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, $
You need to store while loop values into array try this
$rows = array(); if ($type == 'assoc') { while($row = $result->fetch_assoc()) { $rows[] = $row; } } else { while($row = $result->fetch_object()) { $rows[] = $row; } } return $rows;