/** append a SQL string to the query field. Return the added SQL. * @param number $rowCount The maximum number of rows to retrieve * @param number $offset The index of the first row to retrieve */ function limit($rowCount, $offset=0) { $sql = " LIMIT "; $sql .= (int) $offset; $sql .= ", "; $sql .= (int) $rowCount; $this->query .= $sql; return $sql; } |