PHP Doku:: Enables or disables internal report functions - function.maxdb-report.html

Verlauf / Chronik / History: (1) anzeigen

Sie sind hier:
Doku-StartseitePHP-HandbuchFunktionsreferenzDatenbankerweiterungenAnbieterspezifische DatenbankerweiterungenMaxDBMaxDB Funktionenmaxdb_report

Ein Service von Reinhard Neidl - Webprogrammierung.

MaxDB Funktionen

<<maxdb_real_query -- maxdb::real_query

maxdb_rollback -- maxdb::rollback>>

maxdb_report

(PECL maxdb 1.0)

maxdb_reportEnables or disables internal report functions

Beschreibung

bool maxdb_report ( int $flags )

Parameter-Liste

flags

One of the MAXDB_REPORT_XXX constants.

Rückgabewerte

Gibt bei Erfolg TRUE zurück. Im Fehlerfall wird FALSE zurückgegeben.

Beispiele

Beispiel #1 Procedural style

<?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);
?>

Das oben gezeigte Beispiel erzeugt eine ähnliche Ausgabe wie:

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

Keine BenutzerBeiträge.
- Beiträge aktualisieren...



PHP Powered Diese Seite bei php.net
The PHP manual text and comments are covered by the Creative Commons Attribution 3.0 License © the PHP Documentation Group - Impressum - mail("TO:Reinhard Neidl",...)