News Feed
Sections




News Archive
feed this:

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



Community Events





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


composer language interview version library list laravel tool security symfony artisanfiles introduction community conference opinion release series podcast voicesoftheelephpant framework

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