lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> (0) Connect to server
> 1. You build a SQL statement in a string
> 2. You submit the statement
> 3. You retreive rows and columns from the result
> (4) Disconnect from server


The implementation of DBLua (the one made by Mauricio Mediano) is almost
that. It has mainly 4 functions:

- DBOpen: connect to server
- DBExec: executes an SQL statement given as a string
- DBRow: retreive "next" row from the result. Each row is retrieved at once
with all columns stored in a Lua table, indexed by the field name. Returns
nil after last row.
- DBClose: disconnect from server.


-- Roberto