Where
Where
The steps to made a where condition in ivory just involves one array.
Example
//import the ivory class
require_once('Operations.php');
//the instance of the ivory
$ivoryOrm = new Operations();
//an array where you add all the field names of the fields you want to select
$arrSelect[] = "name";
$arrSelect[] = "email";
//an array where you add all the table names you want to select
$tables[] = "users";
//an array where you add all the propertie names and the values of your tables
$arrWhere[] = [
"propName" => "id",
"fieldValue" => 3,
];
//the method select creates the query : SELECT name,email FROM users WHERE id = 3;
$select = $ivoryOrm->select($arrSelect, $tables);
$selectWhere = $ivoryOrm->where($select, $arrWhere);
//the method runQuery is responsible to literally run your query into the database;
$result = $ivoryOrm->runQuery($selectWhere);
Example 2
//import the ivory class
require_once('Operations.php');
//the instance of the ivory
$ivoryOrm = new Operations();
//an array where you add all the field names of the fields you want to select
$arrSelect[] = "name";
$arrSelect[] = "email";
//an array where you add all the table names you want to select
$tables[] = "users";
//an array where you add all the propertie names and the values of your tables
$arrWhere[] = [
"propName" => "name",
"fieldValue" => "jon",
];
//the method select creates the query : SELECT name,email FROM users WHERE name = 'jon';
$select = $ivoryOrm->select($arrSelect, $tables);
$selectWhere = $ivoryOrm->where($select, $arrWhere);
//the method runQuery is responsible to literally run your query into the database;
$result = $ivoryOrm->runQuery($selectWhere);