maxdb_report

(PECL maxdb 1.0)

maxdb_reportEnables or disables internal report functions

說明

bool maxdb_report ( int $flags )

參數

flags

One of the MAXDB_REPORT_XXX constants.

回傳值

如果成功則回傳 TRUE,失敗則回傳 FALSE

範例

Example #1 程序化風格

<?php
/* activate reporting */
maxdb_report(MAXDB_REPORT_ERROR);

$link maxdb_connect("localhost""MONA""RED""DEMODB");

/* check connection */
if (maxdb_connect_errno()) {
   
printf("Connect failed: %s\n"maxdb_connect_error());
   exit();
}

/* this query should report an error */
$result maxdb_query($link,"SELECT Name FROM Nonexistingtable WHERE population > 50000");

maxdb_close($link);
?>

上例的輸出類似於:

Warning: maxdb_query(): -4004 POS(18) Unknown table name:NONEXISTINGTABLE <...>
add a note add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top