public buildOrderByAndLimit ( string $sql, array $orderBy, integer $limit, integer $offset ) : string | ||
$sql | string | the existing SQL (without ORDER BY/LIMIT/OFFSET) |
$orderBy | array | the order by columns. See [[Query::orderBy]] for more details on how to specify this parameter. |
$limit | integer | the limit number. See [[Query::limit]] for more details. |
$offset | integer | the offset number. See [[Query::offset]] for more details. |
return | string | the SQL completed with ORDER BY/LIMIT/OFFSET (if any) |