thinkphp3.2在Controller里为什么select没有数据?

浏览:890 发布日期:2014/01/17 分类:求助交流
刚学thinkphp,请大家多多指教。
class IndexController extends Controller {
public function index(){
$Dao = M("Article");
$articles = $Dao->select(); //用select检索不出数据
//$articles=$Dao->query("select * from think_article" ); //用query有数据

$this->assign('articles', $articles);
// 输出模板
$this->display();
}
}

在application\Common\Conf\config.php里也设置'DB_PREFIX' => 'think_'了。
运行环境:ubuntu、mysql。
为什么用select检索不出数据呢?请大家指教。谢谢。
最佳答案
评论( 相关
后面还有条评论,点击查看>>