mysqli-stmt.bind-param.html
来自「php的帮助文档,涉及到PHP的案例和基本语法,以及实际应用内容」· HTML 代码 · 共 206 行 · 第 1/2 页
HTML
206 行
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head> <title>Binds variables to a prepared statement as parameters</title> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> </head> <body><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="mysqli-stmt.attr-set.html">mysqli_stmt::attr_set</a></div> <div class="next" style="text-align: right; float: right;"><a href="mysqli-stmt.bind-result.html">mysqli_stmt::bind_result</a></div> <div class="up"><a href="class.mysqli-stmt.html">MySQLi_STMT</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div><hr /><div id="mysqli-stmt.bind-param" class="refentry"> <div class="refnamediv"> <h1 class="refname">mysqli_stmt::bind_param</h1> <h1 class="refname">mysqli_stmt_bind_param</h1> <p class="verinfo">(PHP 5)</p><p class="refpurpose"><span class="refname">mysqli_stmt::bind_param</span> -- <span class="refname">mysqli_stmt_bind_param</span> — <span class="dc-title">Binds variables to a prepared statement as parameters</span></p> </div> <div class="refsect1 description"> <h3 class="title">Description</h3> <p class="para">Object oriented style (method):</p> <div class="methodsynopsis dc-description"> <span class="type">bool</span> <span class="methodname"><b><b>mysqli_stmt::bind_param</b></b></span> ( <span class="methodparam"><span class="type">string</span> <tt class="parameter">$types</tt></span> , <span class="methodparam"><span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span> <tt class="parameter reference">&$var1</tt></span> [, <span class="methodparam"><span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span> <tt class="parameter reference">&$...</tt></span> ] )</div> <p class="para rdfs-comment">Procedural style:</p> <div class="methodsynopsis dc-description"> <span class="type">bool</span> <span class="methodname"><b><b>mysqli_stmt_bind_param</b></b></span> ( <span class="methodparam"><span class="type"><span class="type mysqli_stmt">mysqli_stmt</span></span> <tt class="parameter">$stmt</tt></span> , <span class="methodparam"><span class="type">string</span> <tt class="parameter">$types</tt></span> , <span class="methodparam"><span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span> <tt class="parameter reference">&$var1</tt></span> [, <span class="methodparam"><span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span> <tt class="parameter reference">&$...</tt></span> ] )</div> <p class="para rdfs-comment"> Bind variables for the parameter markers in the SQL statement that was passed to <a href="mysqli.prepare.html" class="function">mysqli_prepare()</a>. </p> <blockquote><p><b class="note">Note</b>: If data size of a variable exceeds max. allowed packet size (max_allowed_packet), you have to specify <i>b</i> in <i><tt class="parameter">types</tt></i> and use <a href="mysqli-stmt.send-long-data.html" class="function">mysqli_stmt_send_long_data()</a> to send the data in packets. <br /> </p></blockquote> </div> <div class="refsect1 parameters"> <h3 class="title">Parameters</h3> <p class="para"> <dl> <dt><span class="term"><i><tt class="parameter">stmt</tt></i></span><dd><p class="para">Procedural style only: A statement identifierreturned by <a href="mysqli.stmt-init.html" class="function">mysqli_stmt_init()</a>.</p></dd></dt> <dt> <span class="term"><i><tt class="parameter">types</tt></i></span> <dd> <p class="para"> A string that contains one or more characters which specify the types for the corresponding bind variables: <table border="5"> <caption><b>Type specification chars</b></caption> <colgroup> <thead valign="middle"> <tr valign="middle"> <th colspan="1">Character</th> <th colspan="1">Description</th> </tr> </thead> <tbody valign="middle" class="tbody"> <tr valign="middle"> <td colspan="1" rowspan="1" align="left">i</td> <td colspan="1" rowspan="1" align="left">corresponding variable has type integer</td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left">d</td> <td colspan="1" rowspan="1" align="left">corresponding variable has type double</td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left">s</td>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?