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

search for in the

TokyoTyrantTable::getIterator> <TokyoTyrantTable::genUid
[edit] Last updated: Fri, 25 May 2012

view this page in

TokyoTyrantTable::get

(PECL tokyo_tyrant >= 0.1.0)

TokyoTyrantTable::get行を取得する

説明

public void TokyoTyrantTable::get ( mixed $keys )

行をテーブルデータベースから取得します。 keys は、行を表す主キーの整数値か 複数行を表す整数値の配列となります。

パラメータ

keys

主キー。文字列あるいは整数値。

返り値

行を配列で返します。

例1 TokyoTyrantTable::get() の例

<?php
/* テーブルデータベースに接続します */
$tt = new TokyoTyrantTable("localhost"1979);

/* null を渡して新しい uid を生成します */
$index $tt->put(null, array("column1" => "some data""column2" => "more data"));

/* 行を取得します */
var_dump($tt->get($index));
?>

上の例の出力は以下となります。

array(2) {
  ["column1"]=>
  string(9) "some data"
  ["column2"]=>
  string(9) "more data"
}

注意

注意:

バージョン 0.3.0、このメソッドはパラメータとして配列を受け付けるようになりました。 テーブルからの複数レコードの取得はバイナリセーフではないことに注意しましょう。

参考



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

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