Extending the mysqli class - Page 2

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

Re: Extending the mysqli class

Daz wrote:
Quoted text here. Click to load it


Overriding the constructor is quite common.   But you need to ensure you  
also call the parent class constructor.

As to seeing the code - it's like anything else in PHP.  If it's a PHP  
file, you can see the code.  If, like with mysqli, it's a compiled  
extension, you need to look at the source code for the extension.

If you want some error checking when you open the connection, see if the  
connection is open after calling the mysqli constructor (see if  
mysqli_connect_error() is non-zero).

You don't need an external function - you just need to check for errors.  
  And if you don't want to keep checking the responses, check you  
exception handling.

Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.

Re: Extending the mysqli class

Quoted text here. Click to load it

Thanks for that Jerry. You're a star! :)

Site Timeline