Vendor & contractor integration
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user