Home >Backend Development >PHP Tutorial > thinkPHP的JOIN中表名要不要加前缀解决方案

thinkPHP的JOIN中表名要不要加前缀解决方案

WBOY
WBOYOriginal
2016-06-13 12:59:291077browse

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'

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