Commit ade30f36 authored by Estéban Ristich's avatar Estéban Ristich
Browse files

Add SQL intervention function

parent e060ced8
......@@ -132,6 +132,26 @@ function check_val_in_db($pdo, $table, $col, $value) {
return false;
}
// ---------------------------------------------------------------------
// Intervention
// ---------------------------------------------------------------------
/**
* Récupère tout le contenu des intervention appartenant à un
* équipement
*
* @return false|array
*/
function get_interventions_listall_by_equipment($pdo, $equipment_id) {
$sql = 'SELECT * FROM interventions WHERE f_listing = ?;';
$stmt = $pdo->prepare($sql);
$stmt->execute(array($equipment_id));
$intervention_fetch = $stmt->fetchAll(PDO::FETCH_ASSOC);
if (count($intervention_fetch) > 0)
return $intervention_fetch;
return false;
}
// ---------------------------------------------------------------------
// Category
// ---------------------------------------------------------------------
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment