-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #100 from KumbiaPHP/dev
V0.5.3
- Loading branch information
Showing
4 changed files
with
78 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?php | ||
/** | ||
* KumbiaPHP web & app Framework. | ||
* | ||
* LICENSE | ||
* | ||
* This source file is subject to the new BSD license that is bundled | ||
* with this package in the file LICENSE.txt. | ||
* It is also available through the world-wide-web at this URL: | ||
* http://wiki.kumbiaphp.com/Licencia | ||
* If you did not receive a copy of the license and are unable to | ||
* obtain it through the world-wide-web, please send an email | ||
* to license@kumbiaphp.com so we can send you a copy immediately. | ||
* | ||
* @category Kumbia | ||
* | ||
* @copyright 2005 - 2020 Kumbia Team (http://www.kumbiaphp.com) | ||
* @license http://wiki.kumbiaphp.com/Licencia New BSD License | ||
*/ | ||
namespace Kumbia\ActiveRecord\Query; | ||
|
||
/** | ||
* Obtiene el último id generado en sqlite. | ||
* | ||
* @param \PDO $dbh conexion pdo | ||
* @param string $pk campo clave primaria | ||
* @param string $table nombre de tabla | ||
* @param string $schema esquema | ||
* @return string | ||
*/ | ||
function sqlite_last_insert_id(\PDO $dbh, $pk, $table, $schema = \null) | ||
{ | ||
return $dbh->lastInsertId(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?php | ||
/** | ||
* KumbiaPHP web & app Framework. | ||
* | ||
* LICENSE | ||
* | ||
* This source file is subject to the new BSD license that is bundled | ||
* with this package in the file LICENSE.txt. | ||
* It is also available through the world-wide-web at this URL: | ||
* http://wiki.kumbiaphp.com/Licencia | ||
* If you did not receive a copy of the license and are unable to | ||
* obtain it through the world-wide-web, please send an email | ||
* to license@kumbiaphp.com so we can send you a copy immediately. | ||
* | ||
* @category Kumbia | ||
* | ||
* @copyright 2005 - 2020 Kumbia Team (http://www.kumbiaphp.com) | ||
* @license http://wiki.kumbiaphp.com/Licencia New BSD License | ||
*/ | ||
|
||
namespace Kumbia\ActiveRecord\Query; | ||
|
||
/** | ||
* Adiciona limit y offset a la consulta sql en sqlite. | ||
* | ||
* @param string $sql consulta select | ||
* @param int $limit valor limit | ||
* @param int $offset valor offset | ||
* @return string | ||
*/ | ||
function sqlite_limit($sql, int $limit, int $offset = 0) | ||
{ | ||
return $sql." LIMIT $offset, $limit"; | ||
} |