protected function get_limit_clauses($sql, $limitfrom=0, $limitnum=0) {
        if ($limitnum) {
            $sql .= ' LIMIT '.$limitnum;
            if ($limitfrom) {
                $sql .= ' OFFSET '.$limitfrom;
            }
        }
        return $sql;
    }
protected function get_limit_clauses($sql, $limitfrom=0, $limitnum=0) {
        if ($limitnum) {
            $sql .= ' LIMIT '.$limitnum;
            if ($limitfrom) {
                $sql .= ' OFFSET '.$limitfrom;
            }
        }
        return $sql;
    }
protected function get_limit_clauses ( $ sql , $ limitfrom = 0 , $ limitnum = 0 ) { if ( $ limitnum ) { $ sql .= ' LIMIT ' . $ limitnum ; if ( $ limitfrom ) { $ sql .= ' OFFSET ' . $ limitfrom ; } } return $ sql ; }
Returns the sql statement with clauses to append used to limit a recordset range.
@param string $sql the SQL statement to limit.
@param int $limitfrom return a subset of records, starting at this point (optional, required if $limitnum is set).
@param int $limitnum return a subset comprising this many records (optional, required if $limitfrom is set).
@return string the SQL statement with limiting clauses
Returns the sql statement with clauses to append used to limit a recordset range .