APOCALYX is a...

free Game Engine based on OpenGL (MAIL) (SITE) (FORUM) (BLOG)

Tuesday, July 8, 2008

DataBase connections

Recently several users asked about the DB management capabilities of the engine. APOCALYX includes LuaSQL, so it's very easy to connect to an existent DB, simply write the following lines:
env = luasql.odbc()
conn = env:connect("your_database")
conn:execute(your_sql_query)
The your_database DB must already exist, of course. To create it use the usual ODBC system tools. All the functions are explained in the documentation (read the file APOCALYX-manual-luasql.htm).
The example above uses ODBC. If anyone wants to use MySQL instead, it's necessary to download a different version of the engine. I removed MySQL from the standard release because it requires a DLL that is 600 Kb in size. Click here to download a MySQL enabled version of the executable (3.3 Mb).

No comments: