libraries/ManiaLib/Database/Tools.php
static function getLimitString($offset, $length)
    {
        $offset = (int)$offset;
        $length = (int)$length;
        if (!$offset && !$length) {
            return '';
        } elseif (!$offset && $length == 1) {
            return 'LIMIT 1';
        } else {
            return 'LIMIT ' . $offset . ', ' . $length;
        }
    }
static function getLimitString($offset, $length)
    {
        $offset = (int)$offset;
        $length = (int)$length;
        if (!$offset && !$length) {
            return '';
        } elseif (!$offset && $length == 1) {
            return 'LIMIT 1';
        } else {
            return 'LIMIT ' . $offset . ', ' . $length;
        }
    }
Returns the "LIMIT x,x" string depending on both values