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

Fix Issue #62 Add SQL function for recipe

parent 486b1790
......@@ -1426,4 +1426,14 @@ function set_recipe_new($pdo, $pathname, $intervention_id) {
return array($pdo->lastInsertId(), $err_msg);
}
// ---------------------------------------------------------------------
function get_recipe_listall_by_equipment($pdo, $equipment_id) {
$sql = 'SELECT * FROM recipe WHERE equipment_id = ?;' ;
$stmt = $pdo->prepare($sql);
$stmt->execute(array($equipment_id));
$result_fetch = $stmt->fetchAll(PDO::FETCH_ASSOC);
return $result_fetch;
}
?>
Markdown is supported
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