dever 6 years ago
parent
commit
7963f58554
1 changed files with 8 additions and 0 deletions
  1. 8 0
      KIF/Dao/AbstractDao.class.php

+ 8 - 0
KIF/Dao/AbstractDao.class.php

@@ -281,6 +281,14 @@ abstract class AbstractDao {
         return array_pop($result);
     }
 
+    public function fetchAll($condition = null, $limit = 10, $order = null, $selectCols = '*') {
+        $result = self::findBy($condition, null, $limit, $selectCols, $order);
+        if (!$result) {
+            return false;
+        }
+        return $result;
+    }
+
     /**
      * 获取所有
      * @param string $order 排序方式。默认以主键倒序;有效的格式:"create_time desc"