ellen
- ellen 提出了问题GridView 时间为null
- ellen 2015-04-13 已签到连续签到1天,获得了5个金钱
这篇文章希望对你有所启发
@sjjliqpl 数据库中没有'未发货'、'已发货'、'退货,已处理',只有0、1、9,这一列的筛选搜索不到数据,有办法解决不?
- ellen 提出了问题dropDownList 联动事件
- ellen 2015-04-10 已签到连续签到4天,获得了20个金钱
以下这段代码有问题:
class OrderSearch extends Order { public $customer_state; //<=====就是加在这里 }
不能通过public直接声明属性,而是必须通过get,set方法才行。还有就是属性必须声明在Order类里面才行。
具体方法如下:public function getCustomer_state() { return @$this->customer->customer_state;//@为了防止不存在对应值报错的情况 } public function setCustomer_state($data) { return $this->customer_state = $data; }
大神,谢谢,我知道哪里错了,为啥老是报sql语句错误了
'$query->andFilterWhere(['like', 'Customer.state', $this->customer_state]);' 'Customer.state' 这个我写的 'customer.state' 小小小小小写。。。。。。。
- ellen 2015-04-09 已签到连续签到3天,获得了15个金钱
http://www.yiichina.com/question/637
代码就这个,自定义的那一列筛选功能报sql语句错误
rules()里面也加了关联的字段