Werbung
TokyoTyrant::putShl
(PECL tokyo_tyrant >= 0.1.0)
TokyoTyrant::putShl — Concatenates to a record
Beschreibung
Concatenate to a record and shift to left.
Parameter-Liste
- key
-
A string key
- value
-
The value to concatenate
- width
-
The width of the record
Rückgabewerte
This method returns a reference to the current object and throws TokyoTyrantException on failure.
Beispiele
PHP Code
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
/* Connect to a database on default port */
$tt = new TokyoTyrant("localhost");
/* Create a new key */
$tt->put("key", "just a long piece of data");
/* Concatenate and shift to left */
$tt->putShl("key", " and string", 15);
/* Echo the key */
echo $tt->get("key");
Das oben gezeigte Beispiel erzeugt folgende Ausgabe:
data and string
Siehe auch
- TokyoTyrant::put - Puts values
- TokyoTyrant::putKeep - Puts a record
- TokyoTyrant::putCat - Concatenates to a record