登录  /  注册
thinkphp3.2.3 视图模型实例化后报错问题
███
███ 2018-04-17 17:19:02
[PHP讨论组]
<?php
namespace Admin\Controller;
use Think\Controller;
class ArticleController extends Controller {
    public function lst(){
        $article = D('ArticleView');
        $count = $article->count();// 查询满足要求的总记录数
        $Page = new \Think\Page($count,5);// 实例化分页类 传入总记录数和每页显示的记录数
        $show = $Page->show();// 分页显示输出
        $list = $article->order('id asc')->limit($Page->firstRow.','.$Page->listRows)->select();
        $this->assign('list',$list);// 赋值数据集
        $this->assign('page',$show);// 赋值分页输出
        $this->display();
    }
<?php
namespace Admin\Model;
use Think\Model\ViewModel;
class ArticlViewModel extends ViewModel {
    
}

报错

1146:Table 'tk_blog.blog_article_view' doesn't exist [ SQL语句 ] : SHOW COLUMNS FROM `blog_article_view`


███
███

热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 意见反馈 讲师合作 广告合作 最新更新
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习
PHP中文网抖音号
发现有趣的

Copyright 2014-2024 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号