Database simple-mysql

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Database simple-mysql

Damien Mattei
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:

[]
...

???
--
[hidden email], [hidden email], UNS / OCA / CNRS
_______________________________________________
Beginners mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners