$data_id); try { $res = $pdo->prepare($query); $res->execute($values); } catch (PDOException $e) { throw new Exception('Database query error test_class.php'); } return $res->fetch(PDO::FETCH_ASSOC); } }