The first thing you need the do is set the Database
using the function setDatabase
.
ConnectionManagement::setDatabase([
'db' => [
"driver" => "psql",
"host" => "localhost",
"port" => "8080",
"dbname" => "clients_db",
"user" => "root",
"password" => "1234",
]
]);
Another example:
ConnectionManagement::setDatabase([
'db' => [
"driver" => "sqlite",
"path" => __DIR__ . "/db/database.db"
]
]);
OperationManagement::execute("SELECT * FROM movies");
OperationManagement::feat("SELECT * FROM movies");
OperationManagement::featAll("SELECT * FROM movies");