public function find(): array
{
$query = "SELECT * FROM {$this->userTable}";
$results = $this->db->get_results($query, ARRAY_A);
return $results;
}
public function findByID(int $ID): array
{
$query = $this->db->prepare("SELECT * FROM {$this->userTable} WHERE ID = %d", $ID);
$result = $this->db->get_results($query, ARRAY_A);
return $result;
}
public function update(int $ID, array $newData)
{
$where = ['ID' => $ID];
$format = ['%d'];
$this->db->update($this->userTable, $newData, $where, $format);
}
public function delete(int $ID)
{
$where = ['ID' => $ID];
$format = ['%d'];
$this->db->delete($this->userTable, $where, $format);
}