Source of file AbstractSQL.php
Size: 0,847 Bytes - Last Modified: 2015-11-10T10:03:56-05:00
../src/Query/AbstractSQL.php
123456789101112131415161718192021222324252627282930313233343536
Covered by 34 test(s):
3738
Covered by 34 test(s):
39
Covered by 34 test(s):
40
Covered by 30 test(s):
41
Covered by 30 test(s):
4243
Covered by 34 test(s):
44454647
| <?php /** * Query * * Free Query Builder / Database Abstraction Layer * * @author Timothy J. Warren * @copyright Copyright (c) 2012 - 2014 * @link https://github.com/aviat4ion/Query * @license http://philsturgeon.co.uk/code/dbad-license * @package Query */ // -------------------------------------------------------------------------- namespace Query; /** * parent for database manipulation subclasses * * @package Query * @subpackage Drivers */ abstract class AbstractSQL implements SQLInterface { /** * Limit clause * * @param string $sql * @param int $limit * @param int|bool $offset * @return string */ public function limit($sql, $limit, $offset=FALSE) { $sql .= "\nLIMIT {$limit}"; if (is_numeric($offset)) { $sql .= " OFFSET {$offset}"; } return $sql; } } // End of abstract_sql.php |