Example #1
0
	/**
	 * Restrict the records returned in this query by a limit clause
	 * 
	 * @param string $limit
	 */
	public function limit($limit, $offset = 0) {
		if(!$limit && !$offset) {
			return $this;
		}
		if($limit && !is_numeric($limit)) {
			Deprecation::notice('3.0', 'Please pass limits as 2 arguments, rather than an array or SQL fragment.');
		}
		$this->dataQuery->limit($limit, $offset);
		return $this;
	}