]> granicus.if.org Git - apache/commitdiff
xforms
authorDaniel Gruno <humbedooh@apache.org>
Sun, 27 Jan 2013 15:45:11 +0000 (15:45 +0000)
committerDaniel Gruno <humbedooh@apache.org>
Sun, 27 Jan 2013 15:45:11 +0000 (15:45 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1439104 13f79535-47bb-0310-9956-ffa450edef68

24 files changed:
docs/manual/howto/ssi.xml.meta
docs/manual/mod/allmodules.xml.fr
docs/manual/mod/core.html.en
docs/manual/mod/core.xml.de
docs/manual/mod/core.xml.es
docs/manual/mod/core.xml.ja
docs/manual/mod/core.xml.meta
docs/manual/mod/core.xml.tr
docs/manual/mod/mod_actions.xml.meta
docs/manual/mod/mod_auth_basic.xml.meta
docs/manual/mod/mod_cgi.html.en
docs/manual/mod/mod_cgid.html.en
docs/manual/mod/mod_charset_lite.html.en
docs/manual/mod/mod_data.html.en
docs/manual/mod/mod_dav_fs.xml.meta
docs/manual/mod/mod_dav_lock.xml.meta
docs/manual/mod/mod_ext_filter.html.en
docs/manual/mod/mod_file_cache.html.en
docs/manual/mod/mod_lua.html.en
docs/manual/mod/mod_lua.xml.fr
docs/manual/mod/mod_lua.xml.meta
docs/manual/mod/mod_proxy.xml.meta
docs/manual/platform/windows.html.en
docs/manual/platform/windows.xml.ko

index 1c020635eb5d849c17e027dedfbc2d0ce5bed1d7..0d8deb802c38f150156d34339ef19d927cf41150 100644 (file)
@@ -8,7 +8,7 @@
 
   <variants>
     <variant>en</variant>
-    <variant outdated="yes">fr</variant>
+    <variant>fr</variant>
     <variant outdated="yes">ja</variant>
     <variant outdated="yes">ko</variant>
   </variants>
index 625e0253f11753f7adfa4a5849aa2ceb739d14ee..fa27a41896b06ffd3ab9652d4b59d5f5bc4f3448 100644 (file)
   <modulefile>mod_cache.xml.fr</modulefile>
   <modulefile>mod_cache_disk.xml.fr</modulefile>
   <modulefile>mod_cern_meta.xml.fr</modulefile>
-  <modulefile>mod_cgi.xml</modulefile>
-  <modulefile>mod_cgid.xml</modulefile>
-  <modulefile>mod_charset_lite.xml</modulefile>
-  <modulefile>mod_data.xml</modulefile>
+  <modulefile>mod_cgi.xml.fr</modulefile>
+  <modulefile>mod_cgid.xml.fr</modulefile>
+  <modulefile>mod_charset_lite.xml.fr</modulefile>
+  <modulefile>mod_data.xml.fr</modulefile>
   <modulefile>mod_dav.xml.fr</modulefile>
   <modulefile>mod_dav_fs.xml.fr</modulefile>
   <modulefile>mod_dav_lock.xml.fr</modulefile>
@@ -46,8 +46,8 @@
   <modulefile>mod_env.xml.fr</modulefile>
   <modulefile>mod_example.xml.fr</modulefile>
   <modulefile>mod_expires.xml.fr</modulefile>
-  <modulefile>mod_ext_filter.xml</modulefile>
-  <modulefile>mod_file_cache.xml</modulefile>
+  <modulefile>mod_ext_filter.xml.fr</modulefile>
+  <modulefile>mod_file_cache.xml.fr</modulefile>
   <modulefile>mod_filter.xml.fr</modulefile>
   <modulefile>mod_headers.xml.fr</modulefile>
   <modulefile>mod_heartbeat.xml</modulefile>
index 3b00791e8e6f82ed52e53f44278b745a3ac9860a..880a4042051186de8d245c519057e98a11a74652 100644 (file)
@@ -1274,7 +1274,7 @@ in case of an error</td></tr>
 
       <li>output a customized message</li>
 
-      <li>redirect to a local <var>URL-path</var> to handle the
+      <li>internally redirect to a local <var>URL-path</var> to handle the
       problem/error</li>
 
       <li>redirect to an external <var>URL</var> to handle the
index 4b562d6b3218bac2d024304ca32f5fdef6370fd3..2a052cafc8c5bbf2613c69966e7a1af76f57b688 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0"?>
 <!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
 <?xml-stylesheet type="text/xsl" href="../style/manual.de.xsl"?>
-<!-- English Revision: 344972:1435365 (outdated) -->
+<!-- English Revision: 344972:1438839 (outdated) -->
 
 <!--
  Licensed to the Apache Software Foundation (ASF) under one or more
index 9fb4da379a0cd6d8c40476da663ebce18f1e01b0..35273420ee4bc324e15ac84b836a41db13de56de 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0"?>
 <!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
 <?xml-stylesheet type="text/xsl" href="../style/manual.en.xsl"?>
-<!-- English Revision: 1040494:1435365 (outdated) -->
+<!-- English Revision: 1040494:1438839 (outdated) -->
 
 <!--
  Licensed to the Apache Software Foundation (ASF) under one or more
index 65e6c2aca03833f6568b816ca4a8d59a33857e59..1af1815a48e081cdf1fde268df13b78b21bbd58c 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
 <?xml-stylesheet type="text/xsl" href="../style/manual.ja.xsl"?>
-<!-- English Revision: 669847:1435365 (outdated) -->
+<!-- English Revision: 669847:1438839 (outdated) -->
 
 <!--
  Licensed to the Apache Software Foundation (ASF) under one or more
index b9d96ee4c52f9b48a91a39e026f2df4b34b47a06..e78755527afd76e79a93204836e49a52f246c2bf 100644 (file)
@@ -10,7 +10,7 @@
     <variant outdated="yes">de</variant>
     <variant>en</variant>
     <variant outdated="yes">es</variant>
-    <variant outdated="yes">fr</variant>
+    <variant>fr</variant>
     <variant outdated="yes">ja</variant>
     <variant outdated="yes">tr</variant>
   </variants>
index 65fdabb97302fde3bc4b1eac503cde268c606964..2a78d6c4c8dbea219b3c4357bb73c70f30997512 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0"?>
 <!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
 <?xml-stylesheet type="text/xsl" href="../style/manual.tr.xsl"?>
-<!-- English Revision: 1305164:1435365 (outdated) -->
+<!-- English Revision: 1305164:1438839 (outdated) -->
 <!-- =====================================================
  Translated by: Nilgün Belma Bugüner <nilgun belgeler.org>
    Reviewed by: Orhan Berent <berent belgeler.org>
index 500a6d165fc2e1be4e40f7258f89c59e77b1e452..21a3be67ab926f521a7860ab9a6d9e719d309464 100644 (file)
@@ -9,7 +9,7 @@
   <variants>
     <variant outdated="yes">de</variant>
     <variant>en</variant>
-    <variant outdated="yes">fr</variant>
+    <variant>fr</variant>
     <variant outdated="yes">ja</variant>
     <variant outdated="yes">ko</variant>
   </variants>
index 6418e977531e4965803b4f45eead781fa8d527e0..dd48206a0ee713af36236d6b6df90424ac350d78 100644 (file)
@@ -8,7 +8,7 @@
 
   <variants>
     <variant>en</variant>
-    <variant outdated="yes">fr</variant>
+    <variant>fr</variant>
     <variant outdated="yes">ja</variant>
     <variant outdated="yes">ko</variant>
   </variants>
index 37d4e2e927e8fe7945cc8f0f1275e224bb42466e..940297d8560a57a06f39a474d2e0920b9d7e58bf 100644 (file)
@@ -25,6 +25,7 @@
 <div id="preamble"><h1>Apache Module mod_cgi</h1>
 <div class="toplang">
 <p><span>Available Languages: </span><a href="../en/mod/mod_cgi.html" title="English">&nbsp;en&nbsp;</a> |
+<a href="../fr/mod/mod_cgi.html" hreflang="fr" rel="alternate" title="Français">&nbsp;fr&nbsp;</a> |
 <a href="../ja/mod/mod_cgi.html" hreflang="ja" rel="alternate" title="Japanese">&nbsp;ja&nbsp;</a> |
 <a href="../ko/mod/mod_cgi.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a></p>
 </div>
@@ -238,6 +239,7 @@ in the scriptlog</td></tr>
 </div>
 <div class="bottomlang">
 <p><span>Available Languages: </span><a href="../en/mod/mod_cgi.html" title="English">&nbsp;en&nbsp;</a> |
+<a href="../fr/mod/mod_cgi.html" hreflang="fr" rel="alternate" title="Français">&nbsp;fr&nbsp;</a> |
 <a href="../ja/mod/mod_cgi.html" hreflang="ja" rel="alternate" title="Japanese">&nbsp;ja&nbsp;</a> |
 <a href="../ko/mod/mod_cgi.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a></p>
 </div><div class="top"><a href="#page-header"><img src="../images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Comments</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&amp;A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div>
index cff5d7e0ee15949acbd632aaee70054cf84ec3d3..5af0d449cc0fbf5a1af691df254d3b3a4428e961 100644 (file)
@@ -25,6 +25,7 @@
 <div id="preamble"><h1>Apache Module mod_cgid</h1>
 <div class="toplang">
 <p><span>Available Languages: </span><a href="../en/mod/mod_cgid.html" title="English">&nbsp;en&nbsp;</a> |
+<a href="../fr/mod/mod_cgid.html" hreflang="fr" rel="alternate" title="Français">&nbsp;fr&nbsp;</a> |
 <a href="../ja/mod/mod_cgid.html" hreflang="ja" rel="alternate" title="Japanese">&nbsp;ja&nbsp;</a> |
 <a href="../ko/mod/mod_cgid.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a></p>
 </div>
@@ -106,6 +107,7 @@ the cgi daemon</td></tr>
 </div>
 <div class="bottomlang">
 <p><span>Available Languages: </span><a href="../en/mod/mod_cgid.html" title="English">&nbsp;en&nbsp;</a> |
+<a href="../fr/mod/mod_cgid.html" hreflang="fr" rel="alternate" title="Français">&nbsp;fr&nbsp;</a> |
 <a href="../ja/mod/mod_cgid.html" hreflang="ja" rel="alternate" title="Japanese">&nbsp;ja&nbsp;</a> |
 <a href="../ko/mod/mod_cgid.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a></p>
 </div><div class="top"><a href="#page-header"><img src="../images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Comments</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&amp;A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div>
index 5fdfebc0d873ad28b0f62bc5ed4324a139c35165..8361ffc2cf1de6c523a3bb22f64af0ff593b9fba 100644 (file)
@@ -25,6 +25,7 @@
 <div id="preamble"><h1>Apache Module mod_charset_lite</h1>
 <div class="toplang">
 <p><span>Available Languages: </span><a href="../en/mod/mod_charset_lite.html" title="English">&nbsp;en&nbsp;</a> |
+<a href="../fr/mod/mod_charset_lite.html" hreflang="fr" rel="alternate" title="Français">&nbsp;fr&nbsp;</a> |
 <a href="../ko/mod/mod_charset_lite.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a></p>
 </div>
 <table class="module"><tr><th><a href="module-dict.html#Description">Description:</a></th><td>Specify character set translation or recoding</td></tr>
 </div>
 <div class="bottomlang">
 <p><span>Available Languages: </span><a href="../en/mod/mod_charset_lite.html" title="English">&nbsp;en&nbsp;</a> |
+<a href="../fr/mod/mod_charset_lite.html" hreflang="fr" rel="alternate" title="Français">&nbsp;fr&nbsp;</a> |
 <a href="../ko/mod/mod_charset_lite.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a></p>
 </div><div class="top"><a href="#page-header"><img src="../images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Comments</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&amp;A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div>
 <script type="text/javascript"><!--//--><![CDATA[//><!--
index e5f79266a5797b9e50fbe6fbef1d690e3bd63d63..250e88b976872f40918cda132b6e8d204c7aa99b 100644 (file)
@@ -24,7 +24,8 @@
 <div id="page-content">
 <div id="preamble"><h1>Apache Module mod_data</h1>
 <div class="toplang">
-<p><span>Available Languages: </span><a href="../en/mod/mod_data.html" title="English">&nbsp;en&nbsp;</a></p>
+<p><span>Available Languages: </span><a href="../en/mod/mod_data.html" title="English">&nbsp;en&nbsp;</a> |
+<a href="../fr/mod/mod_data.html" hreflang="fr" rel="alternate" title="Français">&nbsp;fr&nbsp;</a></p>
 </div>
 <table class="module"><tr><th><a href="module-dict.html#Description">Description:</a></th><td>Convert response body into an RFC2397 data URL</td></tr>
 <tr><th><a href="module-dict.html#Status">Status:</a></th><td>Extension</td></tr>
@@ -76,7 +77,8 @@
 
 </div>
 <div class="bottomlang">
-<p><span>Available Languages: </span><a href="../en/mod/mod_data.html" title="English">&nbsp;en&nbsp;</a></p>
+<p><span>Available Languages: </span><a href="../en/mod/mod_data.html" title="English">&nbsp;en&nbsp;</a> |
+<a href="../fr/mod/mod_data.html" hreflang="fr" rel="alternate" title="Français">&nbsp;fr&nbsp;</a></p>
 </div><div class="top"><a href="#page-header"><img src="../images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Comments</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&amp;A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div>
 <script type="text/javascript"><!--//--><![CDATA[//><!--
 var comments_shortname = 'httpd';
index 4c7de8838b59bc70064de788092defcf7c33e824..bea303cc75acce49294d1ef0a7cd62dad08ea4ee 100644 (file)
@@ -8,7 +8,7 @@
 
   <variants>
     <variant>en</variant>
-    <variant outdated="yes">fr</variant>
+    <variant>fr</variant>
     <variant outdated="yes">ja</variant>
     <variant outdated="yes">ko</variant>
   </variants>
index b05b799574c9871480ddd6c53212c0db97597b0c..3c40c2c19b8378c3bbc9bd16a92d8a811281a475 100644 (file)
@@ -8,7 +8,7 @@
 
   <variants>
     <variant>en</variant>
-    <variant outdated="yes">fr</variant>
+    <variant>fr</variant>
     <variant outdated="yes">ja</variant>
   </variants>
 </metafile>
index 3a60c3b3fccc068e6f4b6abef696a9361d833081..21cbfb2d1ce9c3fd6020e274d7bcdf22a649942b 100644 (file)
@@ -25,6 +25,7 @@
 <div id="preamble"><h1>Apache Module mod_ext_filter</h1>
 <div class="toplang">
 <p><span>Available Languages: </span><a href="../en/mod/mod_ext_filter.html" title="English">&nbsp;en&nbsp;</a> |
+<a href="../fr/mod/mod_ext_filter.html" hreflang="fr" rel="alternate" title="Français">&nbsp;fr&nbsp;</a> |
 <a href="../ja/mod/mod_ext_filter.html" hreflang="ja" rel="alternate" title="Japanese">&nbsp;ja&nbsp;</a> |
 <a href="../ko/mod/mod_ext_filter.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a></p>
 </div>
@@ -338,6 +339,7 @@ close(SAVE);
 </div>
 <div class="bottomlang">
 <p><span>Available Languages: </span><a href="../en/mod/mod_ext_filter.html" title="English">&nbsp;en&nbsp;</a> |
+<a href="../fr/mod/mod_ext_filter.html" hreflang="fr" rel="alternate" title="Français">&nbsp;fr&nbsp;</a> |
 <a href="../ja/mod/mod_ext_filter.html" hreflang="ja" rel="alternate" title="Japanese">&nbsp;ja&nbsp;</a> |
 <a href="../ko/mod/mod_ext_filter.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a></p>
 </div><div class="top"><a href="#page-header"><img src="../images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Comments</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&amp;A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div>
index 6f3af63205bd5b35f4f50d7b6fad81bfb5827887..85e87697be3e24f7bd2bd735ebc92b079258afc4 100644 (file)
@@ -25,6 +25,7 @@
 <div id="preamble"><h1>Apache Module mod_file_cache</h1>
 <div class="toplang">
 <p><span>Available Languages: </span><a href="../en/mod/mod_file_cache.html" title="English">&nbsp;en&nbsp;</a> |
+<a href="../fr/mod/mod_file_cache.html" hreflang="fr" rel="alternate" title="Français">&nbsp;fr&nbsp;</a> |
 <a href="../ko/mod/mod_file_cache.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a></p>
 </div>
 <table class="module"><tr><th><a href="module-dict.html#Description">Description:</a></th><td>Caches a static list of files in memory</td></tr>
 </div>
 <div class="bottomlang">
 <p><span>Available Languages: </span><a href="../en/mod/mod_file_cache.html" title="English">&nbsp;en&nbsp;</a> |
+<a href="../fr/mod/mod_file_cache.html" hreflang="fr" rel="alternate" title="Français">&nbsp;fr&nbsp;</a> |
 <a href="../ko/mod/mod_file_cache.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a></p>
 </div><div class="top"><a href="#page-header"><img src="../images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Comments</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&amp;A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div>
 <script type="text/javascript"><!--//--><![CDATA[//><!--
index 99f07db1f811e1db79a8c06c9eea106f02fd65af..e8286ed9d9cd06e4554e4d235407d84fbbcc261c 100644 (file)
@@ -78,6 +78,7 @@ Be sure to check the CHANGES file before upgrading.</div>
 <li><img alt="" src="../images/down.gif" /> <a href="#datastructures">Data Structures</a></li>
 <li><img alt="" src="../images/down.gif" /> <a href="#logging">Logging Functions</a></li>
 <li><img alt="" src="../images/down.gif" /> <a href="#apache2">apache2 Package</a></li>
+<li><img alt="" src="../images/down.gif" /> <a href="#databases">Database connectivity</a></li>
 </ul><ul class="seealso"><li><a href="#comments_section">Comments</a></li></ul></div>
 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
 <div class="section">
@@ -466,6 +467,12 @@ r:parsebody([sizeLimit]) -- parse the request body as a POST and return  a lua t
         r:write("a single string") -- print to response body
         </pre>
 
+        
+        <pre class="prettyprint lang-lua">
+r:dbacquire(dbType[, dbParams]) -- Acquires a connection to a database and returns a database class.
+                                -- See '<a href="#databases">Database connectivity</a>' for details.
+        </pre>
+
         </dd>
     </dl>
 
@@ -508,6 +515,174 @@ r:parsebody([sizeLimit]) -- parse the request body as a POST and return  a lua t
   <dd>internal constants used by <code class="module"><a href="../mod/mod_proxy.html">mod_proxy</a></code></dd>
 </dl>
 <p>(Other HTTP status codes are not yet implemented.)</p>
+</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
+<div class="section">
+<h2><a name="databases" id="databases">Database connectivity</a></h2>
+    
+    <p>
+    Mod_lua implements a simple database feature for querying and running commands
+    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>
+    <pre class="prettyprint lang-lua">
+function handler(r)
+    local database, err = r:dbacquire("mysql", "server=localhost&amp;user=root&amp;database=mydb")
+    if not err then
+        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
+            for k, row in pairs(rows) do
+                r:puts( string.format("Name: %s, Age: %s&lt;br/&gt;", row[1], row[2]) )
+            end
+        else
+            r:puts("Database query error: " .. err)
+        end
+        database:close()
+    else
+        r:puts("Could not connect to the database: " .. err)
+    end
+end
+    </pre>
+
+    <p>
+    To utilize <code class="module"><a href="../mod/mod_dbd.html">mod_dbd</a></code>, simply specify <code>mod_dbd</code>
+    as the database type, or leave the field blank:
+    </p>
+    <pre class="prettyprint lang-lua">
+    local database = r:dbacquire("mod_dbd")
+    </pre>
+
+    <h3><a name="database_object" id="database_object">Database object and contained functions</a></h3>
+        
+        <p>The database object returned by <code>dbacquire</code> has the following methods:</p>
+        <p><strong>Normal select and query from a database:</strong></p>
+    <pre class="prettyprint lang-lua">
+-- Run a statement and return the number of rows affected:
+local affected, errmsg = database:query(r, "DELETE FROM `tbl` WHERE 1")
+
+-- Run a statement and return a result set that can be used synchronously or async:
+local result, errmsg = database:select(r, "SELECT * FROM `people` WHERE 1")
+    </pre>
+
+        <p><strong>Using prepared statements (recommended):</strong></p>
+    <pre class="prettyprint lang-lua">
+-- Create and run a prepared statement:
+local statement, errmsg = database:prepare(r, "DELETE FROM `tbl` WHERE `age` &gt; %u")
+if not errmsg then
+    local result, errmsg = statement:query(20) -- run the statement with age &gt;20
+end
+
+-- Fetch a prepared statement from a DBDPrepareSQL directive:
+local statement, errmsg = database:prepared(r, "someTag")
+if not errmsg then
+    local result, errmsg = statement:select("John Doe", 123) -- inject the values "John Doe" and 123 into the statement
+end
+
+</pre>
+
+        <p><strong>Escaping values, closing databases etc:</strong></p>
+    <pre class="prettyprint lang-lua">
+-- Escape a value for use in a statement:
+local escaped = database:escape(r, [["'|blabla]])
+
+-- Close a database connection and free up handles:
+database:close()
+
+-- Check whether a database connection is up and running:
+local connected = database:active()
+    </pre>
+
+    
+    <h3><a name="result_sets" id="result_sets">Working with result sets</a></h3>
+    
+    <p>The result set returned by <code>db:select</code> or by the prepared statement functions 
+    created through <code>db:prepare</code> can be used to
+    fetch rows synchronously or asynchronously, depending on the row number specified:<br />
+    <code>result(0)</code> fetches all rows in a synchronous manner, returning a table of rows.<br />
+    <code>result(-1)</code> fetches the next available row in the set, asynchronously.<br />
+    <code>result(N)</code> fetches row number <code>N</code>, asynchronously:
+    </p>
+    <pre class="prettyprint lang-lua">
+-- fetch a result set using a regular query:
+local result, err = db:select(r, "SELECT * FROM `tbl` WHERE 1")
+
+local rows = result(0) -- Fetch ALL rows synchronously
+local row = result(-1) -- Fetch the next available row, asynchronously
+local row = result(1234) -- Fetch row number 1234, asynchronously
+    </pre>
+
+    <p>One can construct a function that returns an iterative function to iterate over all rows 
+    in a synchronous or asynchronous way, depending on the async argument:
+    </p>
+    <pre class="prettyprint lang-lua">
+function rows(resultset, async)
+    local a = 0
+    local function getnext()
+        a = a + 1
+        local row = resultset(-1)
+        return row and a or nil, row
+    end
+    if not async then
+        return pairs(resultset(0))
+    else
+        return getnext, self
+    end
+end
+
+local statement, err = db:prepare(r, "SELECT * FROM `tbl` WHERE `age` &gt; %u")
+if not err then
+     -- fetch rows asynchronously:
+    local result, err = statement:select(20)
+    if not err then
+        for index, row in rows(result, true) do
+            ....
+        end
+    end
+
+     -- fetch rows synchronously:
+    local result, err = statement:select(20)
+    if not err then
+        for index, row in rows(result, false) do
+            ....
+        end
+    end
+end
+    </pre>
+
+    
+    <h3><a name="closing_databases" id="closing_databases">Closing a database connection</a></h3>
+        
+
+    <p>Database handles should be closed using <code>database:close()</code> when they are no longer
+    needed. If you do not close them manually, they will eventually be garbage collected and 
+    closed by mod_lua, but you may end up having too many unused connections to the database 
+    if you leave the closing up to mod_lua. Essentially, the following two measures are
+    the same:
+    </p>
+    <pre class="prettyprint lang-lua">
+-- Method 1: Manually close a handle
+local database = r:dbacquire("mod_dbd")
+database:close() -- All done
+
+-- Method 2: Letting the garbage collector close it
+local database = r:dbacquire("mod_dbd")
+database = nil -- throw away the reference
+collectgarbage() -- close the handle via GC
+</pre>
+
+    
+    <h3><a name="database_caveat" id="database_caveat">Precautions when working with databases</a></h3>
+    
+    <p>Although the standard <code>query</code> and <code>run</code> functions are freely 
+    available, it is recommended that you use prepared statements whenever possible, to 
+    both optimize performance (if your db handle lives on for a long time) and to minimize 
+    the risk of SQL injection attacks. <code>run</code> and <code>query</code> should only
+    be used when there are no variables inserted into a statement (a static statement). 
+    When using dynamic statements, use <code>db:prepare</code> or <code>db:prepared</code>.
+    </p>
+    
+
 </div>
 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
 <div class="directive-section"><h2><a name="LuaAuthzProvider" id="LuaAuthzProvider">LuaAuthzProvider</a> <a name="luaauthzprovider" id="luaauthzprovider">Directive</a></h2>
index cf7c4f7e71ed54436619512c3420bd7249f1f9df..219c8f2c63cfa80cc5996f61aa77f73713c3359f 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0"?>
 <!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
 <?xml-stylesheet type="text/xsl" href="../style/manual.fr.xsl"?>
-<!-- English Revision : 1425749 -->
+<!-- English Revision: 1425749:1439099 (outdated) -->
 <!-- French translation : Lucien GENTIS -->
 <!-- Reviewed by : Vincent Deffontaines -->
 
index b55c7710e95c9f695fe435d176007bdf28716825..8fc1a0efdf34e8b8870065a1ce5d7c523d3f652c 100644 (file)
@@ -8,6 +8,6 @@
 
   <variants>
     <variant>en</variant>
-    <variant>fr</variant>
+    <variant outdated="yes">fr</variant>
   </variants>
 </metafile>
index f0185375d448127624a8715f7540d52668653323..38a79fdda73051e6f035124b21c4af3bff8e6129 100644 (file)
@@ -8,7 +8,7 @@
 
   <variants>
     <variant>en</variant>
-    <variant outdated="yes">fr</variant>
+    <variant>fr</variant>
     <variant outdated="yes">ja</variant>
   </variants>
 </metafile>
index e57280adf35b6afe3352acef232b569a1b98b479..4973ab2a1736b2c6309c8d180dda572e0f627d0e 100644 (file)
       Windows filenames instead of Unix ones. However, because Apache
       may interpret backslashes as an "escape character" sequence, you
       should consistently use forward slashes in path names, not
-      backslashes.  Drive letters can be used; if omitted, the drive
-      of the SystemRoot directive (or -d command line option) becomes
-      the default.</p></li>
+      backslashes.</p></li>
 
       <li><p>While filenames are generally case-insensitive on
       Windows, URLs are still treated internally as case-sensitive
index 9b25b798e96bce88532ff585cc5358b3a96cf2f7..51e1d30000252e910195a45ab208d8dc0d52d040 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="EUC-KR" ?>
 <!DOCTYPE manualpage SYSTEM "../style/manualpage.dtd">
 <?xml-stylesheet type="text/xsl" href="../style/manual.ko.xsl"?>
-<!-- English Revision: 105989:1423081 (outdated) -->
+<!-- English Revision: 105989:1438835 (outdated) -->
 
 <!--
  Licensed to the Apache Software Foundation (ASF) under one or more