my function returns always false an i dont know why... my usage is i guess right of the function. I looked in the logs for errors but there are no errors. I am using the pdo library for my mysql requests
here is my function i used
function getUser($id){
$db = Database::connect();
$stmt = $db->prepare("SELECT * FROM user WHERE id = :id");
$stmt->execute(["id" => $id]);
return $stmt->fetch(PDO::FETCH_ASSOC);
}
thx for help