Home > Article > Backend Development > thinkPHP的JOIN中表名要不要加前缀,该怎么解决
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'