Commit 77a7d4bc authored by Gabriel Moreau's avatar Gabriel Moreau
Browse files

Add function get_team_all_by_id

parent d68257b6
......@@ -266,6 +266,18 @@ function get_team_by_id($pdo, $id) {
// ---------------------------------------------------------------------
function get_team_all_by_id($pdo, $id) {
$sql = 'SELECT * FROM equipe WHERE id = ?;';
$stmt = $pdo->prepare($sql);
$stmt->execute(array($id));
$result_fetch = $stmt->fetchAll(PDO::FETCH_ASSOC);
if (count($result_fetch) > 0)
return $result_fetch[0];
return false;
}
// ---------------------------------------------------------------------
function get_team_listshort($pdo) {
$sql = 'SELECT id, nom FROM equipe ORDER BY nom;';
$stmt = $pdo->prepare($sql);
......
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