|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2015-08-27 19:38 UTC] asphp at dsgml dot com
Description: ------------ mysqli_fetch_all() only works with mysqlnd and not libmysqlclient. But it would be very easy to emulate by fetching results in a loop and returning the array. Doing so would make it easier for people to write code that works on either. With mysqlnd it'll be faster, but without it will at least work. Especially since store_result anyway retrieves all the data, it should not be any slower or more memory intensive if the data is directly referenced without being copied. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 09:00:01 2025 UTC |
it is really a bad joke that someone needs to write wrappers like below combined with a configuration or a function_exists() overhead which defeats the whole purpose of the function why can't 'mysqli' handle that transparent and behave for the user idetical independent how php was built? switch($this->mysqlnd) { /** libmysql */ default: while($row = mysqli_fetch_assoc($result)) { $arr[] = $row; } break; /** mysqlnd - 100% native support */ case true: return mysqli_fetch_all($result, MYSQLI_ASSOC); }