News Feed
Jobs Feed
Sections




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

Andrey Hristov's Blog:
Replacing mysqli's Connection, Result and Statement classes
July 09, 2010 @ 10:31:03

On his blog today Andrey Hristov has a quick post that talks about two methods to extend the functionality that the mysqli extension offers in PHP with your own custom code.

Have you ever though about extending mysqli's classes. It's pretty simple to subclass the connection class mysqli. However, subclassing mysqli_result and mysqli_stmt is not so obvious, actually I though that it's even not possible. However, never say never! After discussing mysqli's OO interface for an hour yesterday [...] I found out how one can plug his own classes.

Two code examples are provided - one for extending the mysqli_result and the other extending the mysql_stmt class. You can find more about these and other classes the mysqli extension has to offer in this section of the PHP manual.

0 comments voice your opinion now!
replace mysqli connection result statement class extend


blog comments powered by Disqus

Similar Posts

David Coallier's Blog: Namespaces part 4.1 (What namespaces don't fix (part 1))

Internet Super Hero Blog: PHP 5.3: Persistent Connections with ext/mysqli

Evert Pot's Blog: Creating a Gopher server with PHP and InetD

Web Development Blog: Tutorial: Create a zip file from folders on the fly

Vinu Thomas' Blog: Modifying your MySQL databases to be UTF-8 compliant


Community Events











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


symfony2 podcast package hhvm composer install release application code language component security introduction unittest hack example opinion facebook overview framework

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