This was not sent to the cafe since I used the wrong from address. ---------- Forwarded message ---------- From: Asten, W.G.G. van (Wilfried, Student M-CSC) <w.g.g.vanas...@student.utwente.nl> Date: Thu, Oct 18, 2012 at 12:27 PM Subject: Re: [Haskell-cafe] hdbc parametrized select To: s9gf4...@gmail.com Cc: haskell-cafe@haskell.org
To my knowledge you can combine execute and the fetch functions like this: find conn id = do stmt <- prepare conn "SELECT * FROM table WHERE id = ? LIMIT 1" excute stmt [id] row <- fetchRow stmt On Thu, Oct 18, 2012 at 10:51 AM, <s9gf4...@gmail.com> wrote: > does hdbc have parametrized selects ? > There is execute > execute :: Statement -> [SqlValue] -> IO Integer > and some other functions which get list of parameters but return IO Integer or > IO () > and there is other couple of functions > fetchRow :: Statement -> IO (Maybe [SqlValue]) > which return values of select but do not get parameters > > How can i execute parametrized select with hdbc ? > > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe@haskell.org > http://www.haskell.org/mailman/listinfo/haskell-cafe _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe