downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
search for in the  

<maxdb_commitmaxdb_connect_error>
Last updated: Thu, 26 Jun 2008

maxdb_connect_errno

(PECL maxdb:1.0-7.6.00.38)

maxdb_connect_errno — Returns the error code from last connect call

Description

int maxdb_connect_errno ( void )

The maxdb_connect_errno() function will return the last error code number for last call to maxdb_connect(). If no errors have occured, this function will return zero.

Return Values

An error code value for the last call to maxdb_connect(), if it failed. zero means no error occurred.

Examples

Example #1 maxdb_connect_errno sample

<?php
$link
= maxdb_connect("localhost", "XXXXXXXX", "YYYYYYYYY");

if (!
$link) {
  
printf("Can't connect to localhost. Errorcode: %d\n", maxdb_connect_errno());
}
?>

The above example will output something similar to:

PHP Warning:  maxdb_connect(): -4008 POS(1) Unknown user name/password combination [08004] <...>
Can't connect to localhost. Errorcode: -4008


add a noteadd a note User Contributed Notes
Returns the error code from last connect call
There are no user contributed notes for this page.




<maxdb_commitmaxdb_connect_error>
Last updated: Thu, 26 Jun 2008
show source | credits | sitemap | contact | advertising | mirror sites
Copyright © 2001-2005 The PHP Group
All rights reserved.
This unofficial mirror is operated at: http://phpbuilder.com/
Last updated: Tue Nov 1 20:20:59 2005 EST
Columns / Articles | Tips / Quickies | News | News Linking and RSS Feeds | Shared Code Library
Mail Archives | Support / Discussion Forums | Get Started! Links | Contribute! | Docs