DBI.lua

changeset 3
b61020ca4753
parent 2
c4f02fc67e5a
child 4
c50b0e6f25d6
equal deleted inserted replaced
2:c4f02fc67e5a 3:b61020ca4753
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 function Do(dbh, sql, ...)
60 local sth,err = dbh:prepare(sql)
61
62 if not sth then
63 return false, err
64 end
65
66 return sth:execute(...)
67 end

mercurial