Fix mysqli::fetch_all not supported in some php version
This commit is contained in:
parent
2cf74eafc7
commit
084c2abd0e
1 changed files with 7 additions and 1 deletions
|
@ -200,7 +200,13 @@ abstract class AbstractModel
|
|||
*/
|
||||
public static function createMultipleFromDbResult($result)
|
||||
{
|
||||
return static::createMultiple($result->fetch_all(MYSQLI_ASSOC));
|
||||
$rows = array();
|
||||
|
||||
while($row = $result->fetch_assoc()) {
|
||||
$rows[] = $row;
|
||||
}
|
||||
|
||||
return static::createMultiple($rows);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue