Example #1
0
 public function limit($limit, $size = null)
 {
     if (isset($limit)) {
         if (!empty($size) && $limit != 0) {
             $this->limitPageIndex = $limit;
             $this->limitPageSize = $size;
             $this->limit = DBTool::conditions_getLimit($limit, $size);
         } else {
             if (strpos($limit, 'limit') !== false) {
                 $this->limit = $limit;
             } else {
                 $this->limit = ' limit ' . $limit;
             }
         }
     }
     return $this;
 }