[Haskell-cafe] Fwd: [Haskell-beginners] Database simple-mysql
Damien Mattei
mattei at oca.eu
Wed Dec 5 10:35:38 UTC 2018
-------- Message transféré --------
Sujet : [Haskell-beginners] Database simple-mysql
Date : Wed, 5 Dec 2018 11:29:30 +0100
De : Damien Mattei <mattei at oca.eu>
Répondre à : The Haskell-Beginners Mailing List - Discussion of
primarily beginner-level topics related to Haskell <beginners at haskell.org>
Pour : beginners at haskell.org
why does this works:
let name = "'A 20'"
bd_rows <- query_ conn "select `N° BD` from sidonie.Coordonnées where
Nom = 'A 20'"
putStrLn $ show bd_rows
putStrLn $ show name
i got:
[Only {fromOnly = "-04.3982"}]
"'A 20'"
-04.3982
but not with this:
bd_rows <- query conn "select `N° BD` from sidonie.Coordonnées where
Nom = ?" (Only (name::String))
i got an empty result:
[]
...
???
--
Damien.Mattei at unice.fr, Damien.Mattei at oca.eu, UNS / OCA / CNRS
_______________________________________________
Beginners mailing list
Beginners at haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
More information about the Haskell-Cafe
mailing list