TokyoTyrantTable::put(PECL tokyo_tyrant >= 0.1.0) TokyoTyrantTable::put — Store a row Описание
public int TokyoTyrantTable::put
( string $key
, array $columns
)
Puts a new row into the database. This method parameters are key which is the primary key of the row, passing NULL will generate a new unique id. value is an array containing the row contents which is usually key value pairs. Список параметров
Возвращаемые значенияReturns the primary key on success and throws TokyoTyrantException on error Примеры
Пример #1 TokyoTyrantTable::put() example
<?phpРезультат выполнения данного примера:
array(2) {
["column1"]=>
string(9) "some data"
["column2"]=>
string(9) "more data"
}
array(2) {
["column1"]=>
string(10) "other data"
["column2"]=>
string(11) "better data"
}
|
||