httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From humbed...@apache.org
Subject svn commit: r1430472 - /httpd/httpd/trunk/docs/manual/mod/mod_lua.xml
Date Tue, 08 Jan 2013 19:55:34 GMT
Author: humbedooh
Date: Tue Jan  8 19:55:34 2013
New Revision: 1430472

URL: http://svn.apache.org/viewvc?rev=1430472&view=rev
Log:
Rephrasing a bit of the database docs for mod_lua

Modified:
    httpd/httpd/trunk/docs/manual/mod/mod_lua.xml

Modified: httpd/httpd/trunk/docs/manual/mod/mod_lua.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/mod/mod_lua.xml?rev=1430472&r1=1430471&r2=1430472&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/mod/mod_lua.xml (original)
+++ httpd/httpd/trunk/docs/manual/mod/mod_lua.xml Tue Jan  8 19:55:34 2013
@@ -892,11 +892,13 @@ end
     on the most popular database engines (mySQL, PostgreSQL, FreeTDS, ODBC, SQLite, Oracle)
     as well as mod_dbd.
     </p>
-    <p>Connecting and firing off queries is as easy as:</p>
+    <p>The example below shows how to acquire a database handle and return information
from a table:</p>
     <highlight language="lua">
 function handler(r)
+    -- Acquire a database handle
     local database, err = r:dbacquire("mysql", "server=localhost&amp;user=root&amp;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
     </highlight>
     <p>
-    To utilize <module name="mod_dbd">mod_dbd</module>, simply specify <code>mod_dbd</code>
+    To utilize <module name="mod_dbd">mod_dbd</module>, specify <code>mod_dbd</code>
     as the database type, or leave the field blank:
     </p>
     <highlight language="lua">



Mime
View raw message