Blogger Information
Blog 5
fans 0
comment 0
visits 5362
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
学习Z-PHP框架的关联查询
5AiPHP
Original
735 people have browsed it

Z-PHP框架官网中也有说明,我这只说明下关联别名的设置及使用:

		// $m = D('weather');
		// $r = $m->select();
		// $where['a.wid'] = 1;
		// $field = ['a.wid','a.name'=>'wname','b.mid','b.name'];//关联数据查询时的字段及别名设置
		// $join = 'left join mood b ON a.wid=b.mid';
		// $r = $m->alias('a')->field($field)->join($join)->where($where)->select();
		// P($r);

这里提醒特别注意 $field。

Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post