急!!!用$Product-->query($sql)跨库读取不了数据???

浏览:512 发布日期:2013/02/27 分类:求助交流 关键字: 跨库,
在ProductModel extends Model{
public function getBestSellerProducts() {

$sql ="select * from product limit 1";
$Product = D('Product');
//$data = $Product->query($sql);//用这个不行?输出是空要不是false
$data = $Product->limit(1)->select();//用这个可以
var_dump($data);
}
}

上面的用query()查询为什么不行啊???
最佳答案
评论( 相关
后面还有条评论,点击查看>>