sae里我直接用find()方法,sql里带个orderby
发布于:2022-01-17 09:50:54
#1 at1943
代码里
$nod_webcfg = spClass("nod_webcfg");
$this->webcfg = $nod_webcfg->find();
然后输出错误
SELECT * FROM nod_webcfg ORDER BY LIMIT 1我代码写有什么问题吗?
我会java,但看php感觉思想完全不同,->这个应该是调用方法吧?
2011-09-18 17:38:18
#2 at1943
必须要主键吗,我没设主键行吗
class nod_webcfg extends spModel {
// var $pk = "id";
var $table = "nod_webcfg";
}
2011-09-18 17:49:33
#3 at1943
如果这个主键不是递增怎么吧,order by不是一样没什么大用
2011-09-18 18:53:31
#4 at1943
$this->navis = $nod_navigation->spPager(1, 8)->findAll("select nod_navigation.* from nod_navigation order by nod_navigation.order");
请问分页查询时如何用别的字段排序
2011-09-18 22:31:08
#5 at1943
是我写错了findSql
2011-09-18 22:48:51