thinkphp3.2在Controller里为何select没有数据
Jun 13, 2016 pm 12:30 PM
thinkphp3.2在Controller里为什么select没有数据?
刚学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里也设置'DB_PREFIX' => 'think_'了。
运行环境:ubuntu、mysql。
为什么用select检索不出数据呢?请大家指教。谢谢。

Hot Article

Hot tools Tags

Hot Article

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Solution: Your organization requires you to change your PIN

How to adjust window border settings on Windows 11: Change color and size

How to change title bar color on Windows 11?

OOBELANGUAGE Error Problems in Windows 11/10 Repair

How to enable or disable taskbar thumbnail previews on Windows 11

10 Ways to Adjust Brightness on Windows 11

How to turn off private browsing authentication for iPhone in Safari?
