Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,20 @@
|
|||
module Main (main) where
|
||||
|
||||
import Database.HDBC (IConnection, commit, run, toSql)
|
||||
|
||||
updatePlayers :: IConnection a => a -> String -> Int -> Bool -> Int -> IO Bool
|
||||
updatePlayers conn name score active jerseyNum = do
|
||||
rowCount <- run conn
|
||||
"UPDATE players\
|
||||
\ SET name = ?, score = ?, active = ?\
|
||||
\ WHERE jerseyNum = ?"
|
||||
[ toSql name
|
||||
, toSql score
|
||||
, toSql active
|
||||
, toSql jerseyNum
|
||||
]
|
||||
commit conn
|
||||
return $ rowCount == 1
|
||||
|
||||
main :: IO ()
|
||||
main = undefined
|
||||
Loading…
Add table
Add a link
Reference in a new issue