<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <link rel="stylesheet" href="style.css" type="text/css"> <meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type"> <link rel="Start" href="index.html"> <link rel="Up" href="Mysql.html"> <link title="Index of types" rel=Appendix href="index_types.html"> <link title="Index of exceptions" rel=Appendix href="index_exceptions.html"> <link title="Index of values" rel=Appendix href="index_values.html"> <link title="Index of modules" rel=Appendix href="index_modules.html"> <link title="Mysql" rel="Chapter" href="Mysql.html"><title>Mysql.Prepared</title> </head> <body> <div class="navbar"> <a class="up" href="Mysql.html" title="Mysql">Up</a> </div> <h1>Module <a href="type_Mysql.Prepared.html">Mysql.Prepared</a></h1> <pre><span class="keyword">module</span> Prepared: <code class="code">sig</code> <a href="Mysql.Prepared.html">..</a> <code class="code">end</code></pre><div class="info"> Prepared statements with parameters. Consult the MySQL manual for detailed description and possible problems.<br> </div> <hr width="100%"> <pre><span id="TYPEstmt"><span class="keyword">type</span> <code class="type"></code>stmt</span> </pre> <div class="info"> Prepared statement<br> </div> <pre><span id="TYPEstmt_result"><span class="keyword">type</span> <code class="type"></code>stmt_result</span> </pre> <div class="info"> Prepared query result (rowset)<br> </div> <pre><span id="VALcreate"><span class="keyword">val</span> create</span> : <code class="type"><a href="Mysql.html#TYPEdbd">Mysql.dbd</a> -> string -> <a href="Mysql.Prepared.html#TYPEstmt">stmt</a></code></pre><div class="info"> Create prepared statement. Placeholders for parameters are <code class="code">?</code> and <code class="code">@param</code>. Returned prepared statement is only valid in the context of this connection and can be reused many times during the lifetime of the connection.<br> </div> <pre><span id="VALexecute"><span class="keyword">val</span> execute</span> : <code class="type"><a href="Mysql.Prepared.html#TYPEstmt">stmt</a> -> string array -> <a href="Mysql.Prepared.html#TYPEstmt_result">stmt_result</a></code></pre><div class="info"> Execute the prepared statement with the specified values for parameters.<br> </div> <pre><span id="VALaffected"><span class="keyword">val</span> affected</span> : <code class="type"><a href="Mysql.Prepared.html#TYPEstmt">stmt</a> -> int64</code></pre><div class="info"> <b>Returns</b> Number of rows affected by the last execution of this statement.<br> </div> <pre><span id="VALinsert_id"><span class="keyword">val</span> insert_id</span> : <code class="type"><a href="Mysql.Prepared.html#TYPEstmt">stmt</a> -> int64</code></pre><div class="info"> <b>Returns</b> The rowid of the last inserted row.<br> </div> <pre><span id="VALreal_status"><span class="keyword">val</span> real_status</span> : <code class="type"><a href="Mysql.Prepared.html#TYPEstmt">stmt</a> -> int</code></pre><div class="info"> <b>Returns</b> the error code for the last operation on this statement, <code class="code">0</code> for success.<br> </div> <pre><span id="VALfetch"><span class="keyword">val</span> fetch</span> : <code class="type"><a href="Mysql.Prepared.html#TYPEstmt_result">stmt_result</a> -> string option array option</code></pre><div class="info"> <b>Returns</b> the next row of the result set.<br> </div> <pre><span id="VALresult_metadata"><span class="keyword">val</span> result_metadata</span> : <code class="type"><a href="Mysql.Prepared.html#TYPEstmt">stmt</a> -> <a href="Mysql.html#TYPEresult">Mysql.result</a></code></pre><div class="info"> <b>Returns</b> metadata on the statement's result set.<br> </div> <pre><span id="VALclose"><span class="keyword">val</span> close</span> : <code class="type"><a href="Mysql.Prepared.html#TYPEstmt">stmt</a> -> unit</code></pre><div class="info"> Destroy the prepared statement<br> </div> </body></html>