previousDB::connect() (Previous) (Next) DB_commonnext

View this page in Last updated: Sun, 18 Oct 2009
English | Brazilian Portuguese | Chinese | Dutch | French | German | Hungarian | Japanese | Polish | Russian | Spanish | Turkish

DB::isError()

DB::isError() – Określa czy zmienna jest obiektem DB_Error

Synopsis

boolean isError ( mixed $value )

Description

Sprawdza czy wynik metody DB jest obiektem DB_Error.

Zalecane jest użycie PEAR::isError() zamiast funkcji isError() specyficznej dla DB.

Parameter

mixed $value

Zmienna do sprawdzenia

Return value

boolean - TRUE jeżeli $value jest obiektem DB_Error

Note

This function should be called statically.

Example

Użycie metody isError()

<?php
require_once 'DB.php';

$db =& DB::connect('pgsql://usr:pw@localhost/dbnam');
if (
PEAR::isError($db)) {
    die(
$db->getMessage());
}
?>
previousDB::connect() (Previous) (Next) DB_commonnext

Download Documentation Last updated: Sun, 18 Oct 2009
Do you think that something on this page is wrong? Please file a bug report or add a note.
User Notes:
There are no user contributed notes for this page.