ThinkPHP 关于数据库表与表之间关联的两种方法 首先是通过TK自带的视图模型进行关联 namespace Test\Model;
use Think\Model\ViewModel;
class NewsViewModel extends ViewModel {
public $viewFields = array(
'News'=>array('news_id','title','thumb','keywords','create_time'),
use Think\Model\ViewModel;
class NewsViewModel extends ViewModel {
public $viewFields = array(
'News'=>array('news_id','title','thumb','keywords','create_time'),
本文标题:ThinkPHP 关于数据库表与表之间关联的两种方法
本文链接:https://www.haomeiwen.com/subject/vwydmctx.html
网友评论