Heim > Artikel > Backend-Entwicklung > thinkPHP连表问题,大家进来看看,谢谢了。
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