<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <title>Binds a parameter to a statement variable</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="class.sqlite3stmt.html">SQLite3Stmt</a></div> <div class="next" style="text-align: right; float: right;"><a href="sqlite3stmt.bindvalue.html">SQLite3Stmt::bindValue</a></div> <div class="up"><a href="class.sqlite3stmt.html">SQLite3Stmt</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div><hr /><div id="sqlite3stmt.bindparam" class="refentry"> <div class="refnamediv"> <h1 class="refname">SQLite3Stmt::bindParam</h1> <p class="verinfo">(PHP 5 >= 5.3.0)</p><p class="refpurpose"><span class="refname">SQLite3Stmt::bindParam</span> — <span class="dc-title">Binds a parameter to a statement variable</span></p> </div> <div class="refsect1 description" id="refsect1-sqlite3stmt.bindparam-description"> <h3 class="title">Description</h3> <div class="methodsynopsis dc-description"> <span class="modifier">public</span> <span class="type">bool</span> <span class="methodname"><strong>SQLite3Stmt::bindParam</strong></span> ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$sql_param</code></span> , <span class="methodparam"><span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span> <code class="parameter reference">&$param</code></span> [, <span class="methodparam"><span class="type">int</span> <code class="parameter">$type</code></span> ] )</div> <p class="para rdfs-comment"> Binds a parameter to a statement variable. </p> </div> <div class="refsect1 parameters" id="refsect1-sqlite3stmt.bindparam-parameters"> <h3 class="title">Parameters</h3> <p class="para"> <dl> <dt> <span class="term"><em><code class="parameter">sql_param</code></em></span> <dd> <p class="para"> An <span class="type"><a href="language.types.string.html" class="type string">string</a></span> identifying the statement variable to which the parameter should be bound. </p> </dd> </dt> <dt> <span class="term"><em><code class="parameter">param</code></em></span> <dd> <p class="para"> The parameter to bind to a statement variable. </p> </dd> </dt> <dt> <span class="term"><em><code class="parameter">type</code></em></span> <dd> <p class="para"> The data type of the parameter to bind. <ul class="itemizedlist"> <li class="listitem"> <p class="para"> <em>SQLITE3_INTEGER</em>: The value is a signed integer, stored in 1, 2, 3, 4, 6, or 8 bytes depending on the magnitude of the value. </p> </li> <li class="listitem"> <p class="para"> <em>SQLITE3_FLOAT</em>: The value is a floating point value, stored as an 8-byte IEEE floating point number. </p> </li> <li class="listitem"> <p class="para"> <em>SQLITE3_TEXT</em>: The value is a text string, stored using the database encoding (UTF-8, UTF-16BE or UTF-16-LE). </p> </li> <li class="listitem"> <p class="para"> <em>SQLITE3_BLOB</em>: The value is a blob of data, stored exactly as it was input. </p> </li> <li class="listitem"> <p class="para"> <em>SQLITE3_NULL</em>: The value is a NULL value. </p> </li> </ul> </p> </dd> </dt> </dl> </p> </div> <div class="refsect1 returnvalues" id="refsect1-sqlite3stmt.bindparam-returnvalues"> <h3 class="title">Return Values</h3> <p class="para"> Returns <strong><code>TRUE</code></strong> if the parameter is bound to the statement variable, <strong><code>FALSE</code></strong> on failure. </p> </div> </div><hr /><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="class.sqlite3stmt.html">SQLite3Stmt</a></div> <div class="next" style="text-align: right; float: right;"><a href="sqlite3stmt.bindvalue.html">SQLite3Stmt::bindValue</a></div> <div class="up"><a href="class.sqlite3stmt.html">SQLite3Stmt</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div></body></html>