downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | conferences | my php.net

search for in the

maxdb_connect> <maxdb_connect_errno
[edit] Last updated: Tue, 18 Jun 2013

view this page in

maxdb_connect_error

(PECL maxdb >= 1.0)

maxdb_connect_error直近の接続エラーについての説明を文字列で返す

説明

string maxdb_connect_error ( void )

maxdb_connect_error() 関数は、対応する maxdb_connect_errno() 関数とほぼ同じですが、 直近の maxdb_connect() call で発生したエラーについて、 エラーコードの代わりに文字列を返します。エラーが発生しなかった場合は、 この関数は空の文字列を返します。

返り値

エラーについての文字列を返します。 エラーが発生しなかった場合は空の文字列を返します。

例1 maxdb_connect_error の例

<?php

$link 
maxdb_connect("localhost""nonexisting_user""");

if (!
$link) {
   
printf("localhost に接続できません。エラー: %s\n"maxdb_connect_error());
}
?>

上の例の出力は、 たとえば以下のようになります。

PHP Warning:  maxdb_connect(): -4008 POS(1) Unknown user name/password combination <...>
localhost に接続できません。エラー: POS(1) Unknown user name/password combination

参考



add a note add a note User Contributed Notes maxdb_connect_error - [0 notes]
There are no user contributed notes for this page.

 
show source | credits | sitemap | contact | advertising | mirror sites