©
이 문서에서는 PHP 중국어 웹사이트 매뉴얼 풀어 주다
(PECL maxdb 1.0)
maxdb_report — Enables or disables internal report functions
$flags
)
flags
One of the MAXDB_REPORT_XXX constants.
成功时返回 TRUE
, 或者在失败时返回 FALSE
。
Example #1 过程化风格
<?php
maxdb_report ( MAXDB_REPORT_ERROR );
$link = maxdb_connect ( "localhost" , "MONA" , "RED" , "DEMODB" );
if ( maxdb_connect_errno ()) {
printf ( "Connect failed: %s\n" , maxdb_connect_error ());
exit();
}
$result = maxdb_query ( $link , "SELECT Name FROM Nonexistingtable WHERE population > 50000" );
maxdb_close ( $link );
?>
以上例程的输出类似于:
Warning: maxdb_query(): -4004 POS(18) Unknown table name:NONEXISTINGTABLE <...>