Codeigniter with Yii2    

Codeigniter和Yii2的结合

0

ACTIVE RECORD(ORM)参考: http://www.yiiframework.com/doc-2.0/guide-db-active-record.htmlnamespace app\models; use yii\db\ActiveRecord; class Customer extends ActiveRecord {...

8年前发布  · 2391 次阅读
  ActiveRecord  ORM 
0

举个实际的例子吧,比如进入系统之前的第一步是登录页面,要求用户输入用户名,密码。用户在输入用户名和密码之后,我们会对用户名和密码进行校验。则这时候我们需要一个LoginForm模型,它有两个属性:username,password。我们看model代码:<?php namespace app\models; use yii\ba...

8年前发布  · 779 次阅读
  model  FormModel 
0

ActiveRecord查询:// find the customers whose primary key value is 10 $customers = Customer::findAll(10); $customer = Customer::findOne(10); // the above code is equivalent...

8年前发布  · 934 次阅读
  ActiveRecord  ORM