News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Internet Super Hero:
PHP mysqli_fetch_all()
August 17, 2007 @ 07:59:00

The Internet Super Hero blog points out a new MySQL function for PHP (included with the new MySQL native drivers) that automatically does what countless sites currently do with a loop - grab all of the results from a database query and stuff them into a single array.

Here is excellent news for you. mysqli_fetch_all(), which comes with mysqlnd, does the task of fetching the data sometimes twice as fast as mysqli_fetch_array(). Reason being: it saves a loop with function calls…

The mysqli_fetch_all function allows you to reduce not only code clutter caused by the loops, but also speeds up the process (by 60% according to his findings). This is based on his current setup, though - under different circumstances (and OSes) there were varying results, but none too much off of the 60% mark. The lowest came in at around a 54% increase.

Check out the entire post on more about this handy function and the full details of the "behind the scenes" of how it works.

0 comments voice your opinion now!
mysqlifetchall function speed increase mysqlnd mysqlifetchall function speed increase mysqlnd


blog comments powered by Disqus

Similar Posts

IBM developerWorks: Mastering regular expressions in PHP, Part 1

IBM developerWorks: PHP encryption for the common man

Stijn Leenknegt's Blog: [PHP6] function-return-array idea!

EdFinkler's Blog: Determining if a function is *really* available in PHP

TotalPHP: Using an autoload function to make your life easier


Community Events





Don't see your event here?
Let us know!


tool interview voicesoftheelephpant symfony package podcast series opinion library release version language framework security laravel introduction update install composer community

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework