Home > Backend Development > PHP Tutorial > thinkPHP的JOIN中表名要不要加前缀,该怎么解决

thinkPHP的JOIN中表名要不要加前缀,该怎么解决

WBOY
Release: 2016-06-13 13:40:57
Original
870 people have browsed it

thinkPHP的JOIN中表名要不要加前缀
如果表名是think_work
那么在JOIN里改怎样写


$Model->join('RIGHT JOIN work ON artist.id = work.artist_id')->select();
还是
$Model->join('RIGHT JOIN think_work ON think_artist.id = work.artist_id')->select(

手册上没有写
两种方法试了貌似都不成功

哎,,,怎么tp的问题这么多呢 把我折磨了一天了 各种各样的问题

------解决方案--------------------
'RIGHT JOIN think_work ON think_artist.id = think_work.artist_id'

Related labels:
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