Home >Backend Development >PHP Tutorial >求教tp关联查询?

求教tp关联查询?

WBOY
WBOYOriginal
2016-06-20 12:30:34755browse

若只查a字段,则在Model的protected $_link数组中,用:
"mapping_fields"=>"a",
"as_fields"=>"a",

请问:若想查a、b字段,怎么用?


回复讨论(解决方案)

不是很明白是什么意思

原来 "as_fields"=>"a,b",就可以了。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn