ThinkPHP视图模型写正确了,为什么输出的语句是错误的?
视图模型classProvincecityViewModelextendsViewModel{public$viewFields=array('city'=>array(...
视图模型
class ProvincecityViewModel extends ViewModel {
public $viewFields = array(
'city'=>array('id','province_id','city_name','state','is_delete','update_time','_type'=>'LEFT'),
'province'=>array('id'=>'proid','province_name','_on'=>'city.province_id=province.id'),
);
}
最后的语句:
SELECT COUNT(id) AS tp_count FROM yaqiloan_city city LEFT JOIN yaqiloan_province province ON city.province_id=province.id LIMIT 1 展开
class ProvincecityViewModel extends ViewModel {
public $viewFields = array(
'city'=>array('id','province_id','city_name','state','is_delete','update_time','_type'=>'LEFT'),
'province'=>array('id'=>'proid','province_name','_on'=>'city.province_id=province.id'),
);
}
最后的语句:
SELECT COUNT(id) AS tp_count FROM yaqiloan_city city LEFT JOIN yaqiloan_province province ON city.province_id=province.id LIMIT 1 展开
1个回答
2015-09-29
展开全部
你直接在数据库运行看看啊?看报什么错误
在这问又没谁欠你的
在这问又没谁欠你的
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询