Delete
Delete
The delete can be performed in a table by just sayng the name of the table you want to delete registers into.
Example
//import the ivory class
require_once('Operations.php');
//the instancie of the ivory
$ivoryOrm = new Operations();
$tableName = "users";
//the method creates the query : DELETE FROM users;
$delete = $ivoryOrm->delete($tableName, $props);
//the method runQuery is responsible to literally run your query into the database;
$result = $ivoryOrm->runQuery($delete);
Example Using Where
//import the ivory class
require_once('Operations.php');
//the instance of the ivory
$ivoryOrm = new Operations();
$tableName = "users";
$whereDelete[] = [
"propName" => "id",
"fieldValue" => 10,
];
//the method creates the query : DELETE FROM users WHERE id = 10;
$delete = $ivoryOrm->delete($tableName);
$deleteWhere = $ivoryOrm->where($delete, $whereDelete);
//the method runQuery is responsible to literally run your query into the database;
$result = $ivoryOrm->runQuery($deleteWhere);