News Feed

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

Community News: MySQL native driver for PHP - mysqlnd

Sebastian Bergmann's Blog: Xdebug Performance Boost

Derick Rethans' Blog: Overloaded properties (__get)

Joshua Thijssen: Internal PHP function usage

Brandon Savage's Blog: How To Write A Function In PHP

Community Events

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

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

All content copyright, 2014 :: - Powered by the Solar PHP Framework