CakePHP Cookbook 3.x
Cake\View\Helper\PaginatorHelper::limitControl() was added. This method lets you create a form with a select box for updating the limit value on a paginated result set. © Copyright 2023 Cake Software Foundation was added. Query::innerJoinWith() was added. Query::select() now supports Table and Association objects as parameters. These parameter types will select all the columns on the provided table or association inputs. The prefix serves no real purpose anymore. The various standalone input methods like text(), select() and others no longer generate id attributes. The inputDefaults option has been removed from create()0 码力 | 1244 页 | 1.05 MB | 1 年前3
CakePHP Cookbook 3.x
Cake\View\Helper\PaginatorHelper::limitControl() was added. This method lets you create a form with a select box for updating the limit value on a paginated result set. 3.4 Migration Guide 3.4 Migration Guide added. • Query::innerJoinWith() was added. • Query::select() now supports Table and Association objects as parameters. These parameter types will select all the columns on the provided table or association The prefix serves no real purpose anymore. • The various standalone input methods like text(), select() and others no longer generate id attributes. • The inputDefaults option has been removed from0 码力 | 967 页 | 2.80 MB | 1 年前3
CakePHP Cookbook Documentation 5.xfinder option $this- >paginate($this->Articles, ['finder' => 'published']). Or you can create required select query before hand and then pass it to paginate() $query = $this->Articles->find()->where(['is_published' config. Query::all() was added which runs result decorator callbacks and returns a result set for select queries. Query::comment() was added to add a SQL comment to the executed query. This makes it easier $this->Form->control('tags._ids', ['options' => $tags]); This will render a multiple select element that uses the $tags variable to generate the select box options. You should now create a couple new articles that have0 码力 | 1080 页 | 939.39 KB | 1 年前3
CakePHP Cookbook Documentation 5.xfinder option $this->paginate($this->Articles, ['finder' => 'published']). Or you can create required select query before hand and then pass it to paginate() $query = $this->Articles->find()->where(['is_published' config. • Query::all() was added which runs result decorator callbacks and returns a result set for select queries. • Query::comment() was added to add a SQL comment to the executed query. This makes it $this->Form->control('tags._ids', ['options' => $tags]); This will render a multiple select element that uses the $tags variable to generate the select box options. You should now create a couple new articles that have0 码力 | 848 页 | 2.53 MB | 1 年前3
CakePHP Cookbook 4.x
these classes you will need to update your code. Cake\Database\QueryCompiler now quotes aliases in SELECT clause only when auto-quoting is enabled. Quoting is retained for Postgres to avoid identifiers being precedence over default types set for columns when selecting columns. For example, using $query- >select(['id' => $query->func()->min('id')]) the value for id in fetched entity will be float instead of building select queries. Cake\ORM\Query\UpdateQuery Used for building update queries. Each of these classes lack methods that don’t make sense for that query type. For example, DeleteQuery has no select() clause0 码力 | 1249 页 | 1.04 MB | 1 年前3
CakePHP Cookbook 4.x
these classes you will need to update your code. • Cake\Database\QueryCompiler now quotes aliases in SELECT clause only when auto-quoting is enabled. Quoting is retained for Postgres to avoid identifiers being precedence over default types set for columns when selecting columns. For example, using $query->select(['id' => $query->func()->min('id')]) the value for id in fetched entity will be float instead of Cake\ORM\Query\InsertQuery Used for building insert queries. • Cake\ORM\Query\SelectQuery Used for building select queries. • Cake\ORM\Query\UpdateQuery Used for building update queries. 64 Chapter 3. Migration0 码力 | 967 页 | 2.88 MB | 1 年前3
CmlPHP v2.x 开发手册
goodsModel->getTableName())- >where('status', 1)->select(); 替代 $goodsModel->db()->table($goodsModel- >getTableName())->where('status', 1)->select(); 还可以这么用: $goodsModel->where('status', 1)->getByColumn($cid del- >getTableName())->where('status', 1)->select(); 替代 GoodsModel::getInstance()->db()->table($goodsModel- >getTableName())->where('status', 1)->select(); 还可以这么用: GoodsModel::getInstance()->where('status' >getTableName()) 数据查询 简单数据查询: $this->db()->get('user-id-1'); //select * from pre_user where id = 1; $this->db()->get('user-name-abc'); //select * from pre_user where name='abc'; 多个条件 $this->db()->ge0 码力 | 245 页 | 720.67 KB | 1 年前3
CakePHP Cookbook 2.x
page or resource in your application. This request is first processed by a dispatcher which will select the correct controller object to handle it. Once the request arrives at the controller, it will add the following code to your User and Group models. Before you do it, the view displays an empty select input for Group in the New User form; after – populated with IDs or names from the Group table in extraFunkyModels) with the select options. In the controller action you would put the following: $this->set('groups', $this->User->Group->find('list')); And in the view a multiple select can be created with0 码力 | 1096 页 | 958.62 KB | 1 年前3
CmlPHP v2.x 开发手册
$goodsModel->table($goodsModel->getTableName())->where('status', 1)->select(); 替代 $goodsModel->db()->table($goodsModel->getTableName())->where('status', 1)->select(); 还可以这么用: $goodsModel->where('status', 1)->getByColumn($cid del->getTableName())->where('status', 1)- >select(); 替代 GoodsModel::getInstance()->db()->table($goodsModel->getTableName())- >where('status', 1)->select(); 还可以这么用: GoodsModel::getInstance()->where('status' leName()) 数据查询 简单数据查询: $this->db()->get('user-id-1'); //select * from pre_user where id = 1; $this->db()->get('user-name-abc'); //select * from pre_user where name='abc'; 多个条件 $this->db()->get('0 码力 | 251 页 | 973.37 KB | 1 年前3
CmlPHP v2.x 开发手册
$goodsModel->table($goodsModel->getTableName())->where('status', 1)->select(); 替代 $goodsModel->db()->table($goodsModel->getTableName())->where('status', 1)->select(); 还可以这么用: $goodsModel->where('status', 1)->getByColumn($cid lect(); 替代 GoodsModel::getInstance()->db()->table($goodsModel->getTableName())->where('status', 1 )->select(); 还可以这么用: GoodsModel::getInstance()->where('status', 1)->getByColumn($cid, 'cid'); //即调用mode e()) 47 数据查询 简单数据查询: $this->db()->get('user-id-1'); //select * from pre_user where id = 1; $this->db()->get('user-name-abc'); //select * from pre_user where name='abc'; 多个条件 $this->db()->get('0 码力 | 143 页 | 1.54 MB | 1 年前3
共 79 条
- 1
- 2
- 3
- 4
- 5
- 6
- 8













