略微加速

PHP官方手册 - 互联网笔记

PHP - Manual: maxdb_report

2024-04-30

maxdb_report

(PECL maxdb 1.0)

maxdb_reportEnables or disables internal report functions

说明

maxdb_report ( int $flags ) : bool

参数

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.

官方地址:https://www.php.net/manual/en/function.maxdb-report.php

北京半月雨文化科技有限公司.版权所有 京ICP备12026184号-3