2 Commits
1.1.6 ... main

Author SHA1 Message Date
e9c3fd84dd small cleanup 2025-06-20 11:29:47 -04:00
89d30a8d36 wip 2025-02-25 13:09:01 -05:00
2 changed files with 9 additions and 7 deletions

View File

@ -98,7 +98,12 @@ class Database {
if ( $this->error === false ) {
try {
Debug::debug( 'Attempting to connect to DB with config credentials.' );
$this->pdo = new PDO( 'mysql:host=' . Config::getValue( 'database/dbHost' ) . ';dbname=' . Config::getValue( 'database/dbName' ), Config::getValue( 'database/dbUsername' ), Config::getValue( 'database/dbPassword' ) );
$this->pdo = new PDO(
'mysql:host=' . Config::getValue( 'database/dbHost' ) .
';dbname=' . Config::getValue( 'database/dbName' ),
Config::getValue( 'database/dbUsername' ),
Config::getValue( 'database/dbPassword' )
);
} catch ( PDOException $Exception ) {
$this->error = true;
$this->errorMessage = $Exception->getMessage();
@ -349,7 +354,7 @@ class Database {
}
$tableName = Config::getValue( 'database/dbPrefix' ) . $tableName;
$sql = "{$action} FROM `{$tableName}` WHERE ";
$validOperators = ['=', '!=', '>', '<', '>=', '<=', 'LIKE', 'IS'];
$validOperators = ['=', '!=', '>', '<', '>=', '<=', 'LIKE', 'IS', 'IN'];
$validDelimiters = ['AND', 'OR'];
$values = [];
while ( $whereCount > 2 ) {

View File

@ -66,14 +66,11 @@ class Model {
$ids[] = $id;
}
}
return $ids;
return [ $this->tableName => $ids ];
}
public function uninstallResources() {
// this one needs some work
// should probably save the created resource ID's or something and remove them.
// presumably this isn't a big issue because i would imagine the table is removed
// there may be future instances where you can create resources for other tables
return true;
}