程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 編程語言 >> 網頁編程 >> PHP編程 >> 關於PHP編程 >> zend 2.2 db select 使用例子

zend 2.2 db select 使用例子

編輯:關於PHP編程


use = ->from('foo' = ->from( TableIdentifier('foo', 'bar' = ->from(('f' => 'foo' = ->from(('f' => TableIdentifier('foo' = ->from('foo')->columns(('bar', 'baz' = ->from('foo')->columns(('bar' => 'baz' = ->from('foo')->columns(('bar' => 'baz', 'bam' = ->from('foo')->columns(('bar' => Expression('COUNT(some_column)' = ->from('foo')->columns(( Expression('COUNT(some_column) AS bar' = ->from('foo')->'(COUNT(?) + ?) AS ?', ('some_column', 5, 'bar'), (Expression::TYPE_IDENTIFIER, Expression::TYPE_VALUE, Expression:: = ->from('foo')->('zac', 'm = n' = ->from('foo')->('zac', 'm = n', ('bar', 'baz' = ->from('foo')->('zac', 'm = n', ('bar', 'baz'), Select:: = ->from('foo')->('zac', 'm = n', ('BAR' => 'bar', 'BAZ' => 'baz' = ->from('foo')->(('b' => 'bar'), 'b.foo_id = foo.foo_id' = ->from('foo')->where('x = 5' = ->from('foo')->where(('x = ?' => 5 = ->from('foo')->group(('col1', 'col2' = ->from('foo')->group('col1')->group('col2' = ->from('foo')->group( Expression('DAY(?)', ('col1'), (Expression:: = ->from('foo')->having('x = 5' = ->from('foo')->having(('x = ?' => 5 = ->from('foo')->order('c1' = ->from('foo')->order(('c1', 'c2' = ->from('foo')->order(('c1' => 'DESC', 'c2' => 'Asc')); = ->from('foo')->order(('c1' => 'asc'))->order('c2 desc'); = ->from('foo')->limit(5 = ->from('foo')->limit(5)->offset(10 = ->from('foo')->('zac', '(m = n AND c.x) BETWEEN x AND y.z' = ->from('foo')->order('c1.d2' = ->from('foo')->group('c1.d2' = ->from('foo')->('zac', Expression('(m = n AND c.x) BETWEEN x AND y.z' = ->from('bar')->where->like('y', '%Foo%' = ->from(('x' => = ->from('table')->columns(('*'))->where('c1' => , 'c2' => (1, 2, 3), \Zend\Db\Sql\Predicate\IsNotNull('c3' = ->from('table')->order( Expression('isnull(?) DESC', ('name'), (Expression::TYPE_IDENTIFIER)), 'name' = ->from('foo')->columns(())->('bar', 'm = n', ('thecount' => Expression("COUNT(*)" = ->from('foo'->('tableA', Predicate\Operator('id', '=', 1->('tableB', Predicate\Operator('id', '=', 2->('tableC', Predicate\PredicateSet( Predicate\Operator('id', '=', 3), Predicate\Operator('number', '>', 20

 

  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved