thinkPHP连表问题,大家进来看看,谢谢了。

WBOY
Release: 2016-06-20 12:26:27
Original
939 people have browsed it

join('__COUNTS__ ON __CHOICES__.id = __COUNTS__.cid AND __CHOICES__.vid = __COUNTS__.vid')->order($order)->select();是什么意思,我看不懂,求解释,谢谢了。


回复讨论(解决方案)

相当这样
... inner join counts on choice.id = counts.cid and choices.vid = counts.vid order by $order;
__COUNTS__ 若是有设置表前缀的话,会自动加上 如 t_ 那么 __COUNTS__ 解析后就是 t_counts

source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template