| @@ 22-29 (lines=8) @@ | ||
| 19 | * @param int $qty |
|
| 20 | * @return string |
|
| 21 | */ |
|
| 22 | function limit($sql, $start, $qty) |
|
| 23 | { |
|
| 24 | if (strpos($sql, ' LIMIT ') === false) { |
|
| 25 | return $sql . " LIMIT $start, $qty "; |
|
| 26 | } |
|
| 27 | ||
| 28 | return $sql; |
|
| 29 | } |
|
| 30 | ||
| 31 | /** |
|
| 32 | * Given a SQL returns it with the proper TOP or equivalent method included |
|
| @@ 20-27 (lines=8) @@ | ||
| 17 | * @param int $qty |
|
| 18 | * @return string |
|
| 19 | */ |
|
| 20 | function limit($sql, $start, $qty) |
|
| 21 | { |
|
| 22 | if (strpos($sql, ' LIMIT ') === false) { |
|
| 23 | return $sql . " LIMIT $qty OFFSET $start "; |
|
| 24 | } |
|
| 25 | ||
| 26 | return $sql; |
|
| 27 | } |
|
| 28 | ||
| 29 | /** |
|
| 30 | * Given a SQL returns it with the proper TOP or equivalent method included |
|
| @@ 23-30 (lines=8) @@ | ||
| 20 | * @param int $qty |
|
| 21 | * @return string |
|
| 22 | */ |
|
| 23 | function limit($sql, $start, $qty) |
|
| 24 | { |
|
| 25 | if (strpos($sql, ' LIMIT ') === false) { |
|
| 26 | return $sql . " LIMIT $start, $qty "; |
|
| 27 | } |
|
| 28 | ||
| 29 | return $sql; |
|
| 30 | } |
|
| 31 | ||
| 32 | /** |
|
| 33 | * Given a SQL returns it with the proper TOP or equivalent method included |
|