From: Daniel Gruno
Date: Tue, 8 Jan 2013 19:55:34 +0000 (+0000)
Subject: Rephrasing a bit of the database docs for mod_lua
X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ee8edd5dafc33d8c04d9a9d2798943b379386f7b;p=thirdparty%2Fapache%2Fhttpd.git
Rephrasing a bit of the database docs for mod_lua
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1430472 13f79535-47bb-0310-9956-ffa450edef68
---
diff --git a/docs/manual/mod/mod_lua.xml b/docs/manual/mod/mod_lua.xml
index d18d1d1dcd6..3e68e2c4396 100644
--- a/docs/manual/mod/mod_lua.xml
+++ b/docs/manual/mod/mod_lua.xml
@@ -892,11 +892,13 @@ end
on the most popular database engines (mySQL, PostgreSQL, FreeTDS, ODBC, SQLite, Oracle)
as well as mod_dbd.
- Connecting and firing off queries is as easy as:
+ The example below shows how to acquire a database handle and return information from a table:
function handler(r)
+ -- Acquire a database handle
local database, err = r:dbacquire("mysql", "server=localhost&user=root&database=mydb")
if not err then
+ -- Select some information from it
local results, err = database:select(r, "SELECT `name`, `age` FROM `people` WHERE 1")
if not err then
local rows = results(0) -- fetch all rows synchronously
@@ -913,7 +915,7 @@ function handler(r)
end
- To utilize mod_dbd, simply specify mod_dbd
+ To utilize mod_dbd, specify mod_dbd
as the database type, or leave the field blank: