downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

TokyoTyrant::putKeep> <TokyoTyrant::put
[edit] Last updated: Fri, 25 May 2012

view this page in

TokyoTyrant::putCat

(PECL tokyo_tyrant >= 0.1.0)

TokyoTyrant::putCatConcatenates to a record

Beschreibung

public TokyoTyrant TokyoTyrant::putCat ( mixed $keys [, string $value ] )

Appends a value into existing key or multiple values if keys is an array. The second parameter is mandatory if keys is a string. If the record does not exist a new record is created.

Parameter-Liste

keys

A string key or an array of key-value pairs

value

The value in case a string key is used

Rückgabewerte

This method returns a reference to the current object and throws TokyoTyrantException on failure.

Beispiele

Beispiel #1 TokyoTyrant::putCat() example

<?php
/* Connect to a database on default port */
$tt = new TokyoTyrant("localhost");

/* Create a new key */
$tt->put("key""value");

/* Concatenate single key-value pair */
$tt->putCat("key"" has more data");

/* Echo the key */
echo $tt->get("key");
?>

Das oben gezeigte Beispiel erzeugt folgende Ausgabe:

value has more data

Siehe auch



add a note add a note User Contributed Notes TokyoTyrant::putCat
There are no user contributed notes for this page.

 
show source | credits | stats | sitemap | contact | advertising | mirror sites