Zend2 Wiki
ホーム
新規
編集
差分
バックアップ
添付
最終更新
一覧
検索
ヘルプ
編集 : Zend/Db/Sql (ID:#LrEKQK5)
Zend
Db
Sql
** where [#LrEKQK5] :引数|Where|\Closure|string|array|Predicate\PredicateInterface $predicate string $combination Predicate\PredicateSetで定義されている OP_* の中から一つ Where句を設定 #sh(php){$select->where(array("id"=>1, "name"=>"yamada"));} WHERE `id` = '1' AND `name` = 'yamada' #sh(php){$select->where(array("id"=>1, "name"=>"yamada"), Zend\Db\Sql\Predicate\PredicateSet::OP_OR);} WHERE `id` = '1' OR `name` = 'yamada' Predicate\PredicateInterface #sh(php){{ $nest = $select->where->nest(); $nest->equalTo("name", "yamada"); $nest->OR->equalTo("age", "20"); $nest->unnest(); }} WHERE (`name` = 'yamada' OR `age` = '20') #sh(php){{ $nest = $select->where->nest(); $nest2_1 = $nest->nest(); $nest2_1->equalTo("name", "yamada"); $nest2_1->OR->equalTo("name", "tanaka"); $nest2_1->unnest(); $nest2_2 = $nest->AND->nest(); $nest2_2->equalTo("age", "10"); $nest2_2->OR->equalTo("age", "20"); $nest2_2->unnest(); $nest->unnest(); }} WHERE ((`name` = 'yamada' OR `name` = 'tanaka') AND (`age` = '10' OR `age` = '20')) #sh(php){$select->where->NEST->equalTo("name", "yamada")->OR->equalTo("age", "20")->UNNEST;} WHERE (`name` = 'yamada' OR `age` = '20') #sh(php){{ $select->where->NEST ->NEST ->equalTo("name", "yamada") ->OR->equalTo("name", "tanaka") ->UNNEST ->AND->NEST ->equalTo("age", "10") ->OR->equalTo("age", "20") ->UNNEST ->UNNEST; }} WHERE ((`name` = 'yamada' OR `name` = 'tanaka') AND (`age` = '10' OR `age` = '20'))
** where [#LrEKQK5] :引数|Where|\Closure|string|array|Predicate\PredicateInterface $predicate string $combination Predicate\PredicateSetで定義されている OP_* の中から一つ Where句を設定 #sh(php){$select->where(array("id"=>1, "name"=>"yamada"));} WHERE `id` = '1' AND `name` = 'yamada' #sh(php){$select->where(array("id"=>1, "name"=>"yamada"), Zend\Db\Sql\Predicate\PredicateSet::OP_OR);} WHERE `id` = '1' OR `name` = 'yamada' Predicate\PredicateInterface #sh(php){{ $nest = $select->where->nest(); $nest->equalTo("name", "yamada"); $nest->OR->equalTo("age", "20"); $nest->unnest(); }} WHERE (`name` = 'yamada' OR `age` = '20') #sh(php){{ $nest = $select->where->nest(); $nest2_1 = $nest->nest(); $nest2_1->equalTo("name", "yamada"); $nest2_1->OR->equalTo("name", "tanaka"); $nest2_1->unnest(); $nest2_2 = $nest->AND->nest(); $nest2_2->equalTo("age", "10"); $nest2_2->OR->equalTo("age", "20"); $nest2_2->unnest(); $nest->unnest(); }} WHERE ((`name` = 'yamada' OR `name` = 'tanaka') AND (`age` = '10' OR `age` = '20')) #sh(php){$select->where->NEST->equalTo("name", "yamada")->OR->equalTo("age", "20")->UNNEST;} WHERE (`name` = 'yamada' OR `age` = '20') #sh(php){{ $select->where->NEST ->NEST ->equalTo("name", "yamada") ->OR->equalTo("name", "tanaka") ->UNNEST ->AND->NEST ->equalTo("age", "10") ->OR->equalTo("age", "20") ->UNNEST ->UNNEST; }} WHERE ((`name` = 'yamada' OR `name` = 'tanaka') AND (`age` = '10' OR `age` = '20'))
ページの更新
差分
プレビュー
キャンセル
スポンサー
ログイン
登録
TITLE
Data is Null!