Vendor & contractor integration

This commit is contained in:
2021-06-10 05:20:29 -04:00
parent f2d7d9ee14
commit b16b55fa11
24 changed files with 1036 additions and 111 deletions

View File

@@ -29,7 +29,7 @@ use App\LobbySIO\Config\Registry;
class Connect {
public $dbconn;
public $lastInsertId = null;
// open conn
public function __construct() {
$this->openPDO();
@@ -61,7 +61,19 @@ class Connect {
public function runQuery( $sql ) {
try {
$count = $this->dbconn->exec($sql) or print_r($this->dbconn->errorInfo());
} catch(\PDOException $e) {
} catch(\PDOException $e) {
echo __LINE__.$e->getMessage();
}
}
// insert or update something
public function runQueryWithId( $sql ) {
try {
$count = $this->dbconn->exec($sql) or print_r($this->dbconn->errorInfo());
$lastInsertId = $this->dbconn->lastInsertId();
return $lastInsertId;
} catch(\PDOException $e) {
echo __LINE__.$e->getMessage();
}
}