mirror of
https://github.com/standardebooks/web.git
synced 2025-07-14 18:42:00 -04:00
Add database and ORM scaffolding
This commit is contained in:
parent
42ba2f8680
commit
9d923605d8
8 changed files with 278 additions and 0 deletions
15
lib/Db.php
Normal file
15
lib/Db.php
Normal file
|
@ -0,0 +1,15 @@
|
|||
<?
|
||||
|
||||
class Db{
|
||||
public static function GetLastInsertedId(){
|
||||
return $GLOBALS['DbConnection']->GetLastInsertedId();
|
||||
}
|
||||
|
||||
public static function Query(string $query, $args = []){
|
||||
if(!is_array($args)){
|
||||
$args = [$args];
|
||||
}
|
||||
|
||||
return $GLOBALS['DbConnection']->Query($query, $args);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue