PHP Doku:: Return the result code of the last operation - memcached.getresultcode.html

Verlauf / Chronik / History: (1) anzeigen

Sie sind hier:
Doku-StartseitePHP-HandbuchFunktionsreferenzSonstige DiensteMemcachedThe Memcached classMemcached::getResultCode

Ein Service von Reinhard Neidl - Webprogrammierung.

The Memcached class

<<Memcached::getOption

Memcached::getResultMessage>>

Memcached::getResultCode

(PECL memcached >= 0.1.0)

Memcached::getResultCodeReturn the result code of the last operation

Beschreibung

public int Memcached::getResultCode ( void )

Memcached::getResultCode() returns one of the Memcached::RES_* constants that is the result of the last executed Memcached method.

Parameter-Liste

Diese Funktion hat keine Parameter.

Rückgabewerte

Result code of the last Memcached operation.

Beispiele

Beispiel #1 Memcached::getResultCode() example

<?php
$m 
= new Memcached();
$m->addServer('localhost'11211);

$m->add('foo''bar');
if (
$m->getResultCode() == Memcached::RES_NOTSTORED) {
    
/* ... */
}
?>


Ein BenutzerBeitrag:
- Beiträge aktualisieren...
Pablo Viojo pviojo at gmail dot com
3.09.2009 19:12
Memcached::RES_* values:

    * Memcached::RES_SUCCESS: 0
    * Memcached::RES_FAILURE: 1
    * Memcached::RES_HOST_LOOKUP_FAILURE: 2
    * Memcached::RES_UNKNOWN_READ_FAILURE: 7
    * Memcached::RES_PROTOCOL_ERROR: 8
    * Memcached::RES_CLIENT_ERROR: 9
    * Memcached::RES_SERVER_ERROR: 10
    * Memcached::RES_WRITE_FAILURE: 5
    * Memcached::RES_DATA_EXISTS: 12
    * Memcached::RES_NOTSTORED: 14
    * Memcached::RES_NOTFOUND: 16
    * Memcached::RES_PARTIAL_READ: 18
    * Memcached::RES_SOME_ERRORS: 19
    * Memcached::RES_NO_SERVERS: 20
    * Memcached::RES_END: 21
    * Memcached::RES_ERRNO: 25
    * Memcached::RES_BUFFERED: 31
    * Memcached::RES_TIMEOUT: 30
    * Memcached::RES_BAD_KEY_PROVIDED: 32
    * Memcached::RES_CONNECTION_SOCKET_CREATE_FAILURE: 11
    * Memcached::RES_PAYLOAD_FAILURE: -1001



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",...)