neo 访问次数 : 11 注册日期 : 05-05-09 17:05 上次访问 : 09-10-29 21:05 |
limit -20,20这个错误是致命的, 能不能立即发布一个补丁? |
回帖 |
wwccss 访问次数 : 593 注册日期 : 05-05-01 10:08 上次访问 : 10-07-19 11:44 |
[code] /** * 生成SQL查询语句的Limit部分 * * Thanks to lixiaoliang@gmail.com and panzs@supcon.com for their advice of LIMIT -20,20 * @return string Limit语句。 */ function Limit() { //保证最后一页查出的记录数为RecPerPage。加上不等于1的限制是为了防止出现limit -20,10这样的情况。 if($this->_RecTotal < $this->_RecPerPage) { $Limit = " LIMIT 0,".$this->_RecTotal; } elseif($this->_PageID == $this->_PageTotal and $this->_PageTotal != 1) { $Limit = " LIMIT ".($this->_RecTotal - $this->_RecPerPage).",".$this->_RecPerPage; } else { $Limit = " LIMIT ".$this->_RecPerPage * ($this->_PageID - 1).",".$this->_RecPerPage; } return $Limit; }[/code] 将上面的这一段代码代替Include/Class/Page.class中的limit()方法。 |
回帖 |
neo 访问次数 : 11 注册日期 : 05-05-09 17:05 上次访问 : 09-10-29 21:05 |
可以了,谢谢,希望早点看到0.4版本 |
回帖 |