DBI.lua

changeset 4
c50b0e6f25d6
parent 3
b61020ca4753
child 14
98192b7d4e89
equal deleted inserted replaced
3:b61020ca4753 4:c50b0e6f25d6
54 54
55 -- Calls DBD.{Driver}.New(...) 55 -- Calls DBD.{Driver}.New(...)
56 return connection_class.New(name, username, password, host, port) 56 return connection_class.New(name, username, password, host, port)
57 end 57 end
58 58
59 -- Help function to do prepare and execute in
60 -- a single step
59 function Do(dbh, sql, ...) 61 function Do(dbh, sql, ...)
60 local sth,err = dbh:prepare(sql) 62 local sth,err = dbh:prepare(sql)
61 63
62 if not sth then 64 if not sth then
63 return false, err 65 return false, err

mercurial