<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/book.sqlite3.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'ja',
  ),
  'this' => 
  array (
    0 => 'class.sqlite3stmt.php',
    1 => 'SQLite3Stmt',
    2 => 'SQLite3Stmt クラス',
  ),
  'up' => 
  array (
    0 => 'book.sqlite3.php',
    1 => 'SQLite3',
  ),
  'prev' => 
  array (
    0 => 'class.sqlite3exception.php',
    1 => 'SQLite3Exception',
  ),
  'next' => 
  array (
    0 => 'sqlite3stmt.bindparam.php',
    1 => 'SQLite3Stmt::bindParam',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'ja',
    'path' => 'reference/sqlite3/sqlite3stmt.xml',
  ),
  'history' => 
  array (
  ),
  'extra_header_links' => 
  array (
    'rel' => 'alternate',
    'href' => '/manual/en/feeds/class.sqlite3stmt.atom',
    'type' => 'application/atom+xml',
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="class.sqlite3stmt" class="reference">
 <h1 class="title">SQLite3Stmt クラス</h1>
 

 <div class="partintro"><p class="verinfo">(PHP 5 &gt;= 5.3.0, PHP 7, PHP 8)</p>


  <div class="section" id="sqlite3stmt.intro">
   <h2 class="title">はじめに</h2>
   <p class="simpara">
    SQLite 3 拡張モジュールのプリペアドステートメントを扱うクラスです。
    インスタンスは <span class="methodname"><a href="sqlite3.prepare.php" class="methodname">SQLite3::prepare()</a></span> で取得します。
    <span class="methodname"><a href="sqlite3stmt.execute.php" class="methodname">SQLite3Stmt::execute()</a></span> を呼び出すとクエリを実行し、
    結果セットを扱う <span class="classname"><a href="class.sqlite3result.php" class="classname">SQLite3Result</a></span> を返します。
   </p>
  </div>


  <div class="section" id="sqlite3stmt.synopsis">
   <h2 class="title">クラス概要</h2>


   <div class="classsynopsis"><div class="classsynopsisinfo">
    
     <span class="modifier">class</span> <strong class="classname"><strong class="classname">SQLite3Stmt</strong></strong>
     {</div>

    <div class="classsynopsisinfo classsynopsisinfo_comment">/* 定数 */</div>
    <div class="fieldsynopsis">
     <span class="modifier">public</span>
     <span class="modifier">const</span>
     <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
      <var class="fieldsynopsis_varname"><a href="class.sqlite3stmt.php#sqlite3stmt.constants.explain-mode-prepared"><var class="varname">EXPLAIN_MODE_PREPARED</var></a></var><span class="initializer"> = 0</span>;</div>

    <div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="modifier">const</span>
     <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
      <var class="fieldsynopsis_varname"><a href="class.sqlite3stmt.php#sqlite3stmt.constants.explain-mode-explain"><var class="varname">EXPLAIN_MODE_EXPLAIN</var></a></var><span class="initializer"> = 1</span>;</div>

    <div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="modifier">const</span>
     <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
      <var class="fieldsynopsis_varname"><a href="class.sqlite3stmt.php#sqlite3stmt.constants.explain-mode-explain-query-plan"><var class="varname">EXPLAIN_MODE_EXPLAIN_QUERY_PLAN</var></a></var><span class="initializer"> = 2</span>;</div>


    <div class="classsynopsisinfo classsynopsisinfo_comment">/* メソッド */</div>
    <div class="constructorsynopsis dc-description">
   <span class="modifier">private</span> <span class="modifier">function</span> <span class="methodname"><a href="sqlite3stmt.construct.php" class="methodname">__construct</a></span>(<span class="methodparam"><span class="type"><a href="class.sqlite3.php" class="type SQLite3">SQLite3</a></span> <code class="parameter">$sqlite3</code></span>, <span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$query</code></span>)</div>

    <div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="modifier">function</span> <span class="methodname"><a href="sqlite3stmt.bindparam.php" class="methodname">bindParam</a></span>(<span class="methodparam"><span class="type"><span class="type"><a href="language.types.string.php" class="type string">string</a></span>|<span class="type"><a href="language.types.integer.php" class="type int">int</a></span></span> <code class="parameter">$param</code></span>, <span class="methodparam"><span class="type"><a href="language.types.mixed.php" class="type mixed">mixed</a></span> <code class="parameter reference">&$var</code></span>, <span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$type</code><span class="initializer"> = <strong><code><a href="sqlite3.constants.php#constant.sqlite3-text">SQLITE3_TEXT</a></code></strong></span></span>): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="modifier">function</span> <span class="methodname"><a href="sqlite3stmt.bindvalue.php" class="methodname">bindValue</a></span>(<span class="methodparam"><span class="type"><span class="type"><a href="language.types.string.php" class="type string">string</a></span>|<span class="type"><a href="language.types.integer.php" class="type int">int</a></span></span> <code class="parameter">$param</code></span>, <span class="methodparam"><span class="type"><a href="language.types.mixed.php" class="type mixed">mixed</a></span> <code class="parameter">$value</code></span>, <span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$type</code><span class="initializer"> = <strong><code><a href="sqlite3.constants.php#constant.sqlite3-text">SQLITE3_TEXT</a></code></strong></span></span>): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="modifier">function</span> <span class="methodname"><a href="sqlite3stmt.busy.php" class="methodname">busy</a></span>(): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="modifier">function</span> <span class="methodname"><a href="sqlite3stmt.clear.php" class="methodname">clear</a></span>(): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="modifier">function</span> <span class="methodname"><a href="sqlite3stmt.close.php" class="methodname">close</a></span>(): <span class="type"><a href="language.types.singleton.php" class="type true">true</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="modifier">function</span> <span class="methodname"><a href="sqlite3stmt.execute.php" class="methodname">execute</a></span>(): <span class="type"><span class="type"><a href="class.sqlite3result.php" class="type SQLite3Result">SQLite3Result</a></span>|<span class="type"><a href="language.types.singleton.php" class="type false">false</a></span></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="modifier">function</span> <span class="methodname"><a href="sqlite3stmt.explain.php" class="methodname">explain</a></span>(): <span class="type"><a href="language.types.integer.php" class="type int">int</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="modifier">function</span> <span class="methodname"><a href="sqlite3stmt.getsql.php" class="methodname">getSQL</a></span>(<span class="methodparam"><span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span> <code class="parameter">$expand</code><span class="initializer"> = <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong></span></span>): <span class="type"><span class="type"><a href="language.types.string.php" class="type string">string</a></span>|<span class="type"><a href="language.types.singleton.php" class="type false">false</a></span></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="modifier">function</span> <span class="methodname"><a href="sqlite3stmt.paramcount.php" class="methodname">paramCount</a></span>(): <span class="type"><a href="language.types.integer.php" class="type int">int</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="modifier">function</span> <span class="methodname"><a href="sqlite3stmt.readonly.php" class="methodname">readOnly</a></span>(): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="modifier">function</span> <span class="methodname"><a href="sqlite3stmt.reset.php" class="methodname">reset</a></span>(): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="modifier">function</span> <span class="methodname"><a href="sqlite3stmt.setexplain.php" class="methodname">setExplain</a></span>(<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$mode</code></span>): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>

   }</div>


  </div>


  <div class="section" id="sqlite3stmt.constants">
   <h2 class="title">定義済み定数</h2>
   <dl>

    
     <dt id="sqlite3stmt.constants.explain-mode-prepared"><strong><code><a href="class.sqlite3stmt.php#sqlite3stmt.constants.explain-mode-prepared">SQLite3Stmt::EXPLAIN_MODE_PREPARED</a></code></strong></dt>
     <dd>
      <p class="simpara">
       ステートメントは、通常のプリペアドステートメントモードで動作します (<code class="literal">EXPLAIN</code> は付きません)。
       PHP 8.5.0 以降で、libsqlite 3.43.0 以降を使ってビルドした場合に
       利用できます。
      </p>
     </dd>
    

    
     <dt id="sqlite3stmt.constants.explain-mode-explain"><strong><code><a href="class.sqlite3stmt.php#sqlite3stmt.constants.explain-mode-explain">SQLite3Stmt::EXPLAIN_MODE_EXPLAIN</a></code></strong></dt>
     <dd>
      <p class="simpara">
       ステートメントは、先頭に <code class="literal">EXPLAIN</code> を付けた場合と同じように動作し、
       仮想マシンのオペコード情報を返します。
       PHP 8.5.0 以降で、libsqlite 3.43.0 以降を使ってビルドした場合に
       利用できます。
      </p>
     </dd>
    

    
     <dt id="sqlite3stmt.constants.explain-mode-explain-query-plan"><strong><code><a href="class.sqlite3stmt.php#sqlite3stmt.constants.explain-mode-explain-query-plan">SQLite3Stmt::EXPLAIN_MODE_EXPLAIN_QUERY_PLAN</a></code></strong></dt>
     <dd>
      <p class="simpara">
       ステートメントは、先頭に <code class="literal">EXPLAIN QUERY PLAN</code> を付けた場合と同じように動作し、
       高レベルなクエリプラン情報を返します。
       PHP 8.5.0 以降で、libsqlite 3.43.0 以降を使ってビルドした場合に
       利用できます。
      </p>
     </dd>
    

   </dl>
  </div>


 </div>

 





























































































<h2>目次</h2><ul class="chunklist chunklist_reference"><li><a href="sqlite3stmt.bindparam.php">SQLite3Stmt::bindParam</a> — パラメータを変数にバインドする</li><li><a href="sqlite3stmt.bindvalue.php">SQLite3Stmt::bindValue</a> — パラメータの値を変数にバインドする</li><li><a href="sqlite3stmt.busy.php">SQLite3Stmt::busy</a> — ステートメントがフェッチされていて、まだ完了していないかどうかを返す</li><li><a href="sqlite3stmt.clear.php">SQLite3Stmt::clear</a> — 現在バインドされているすべてのパラメータをクリアする</li><li><a href="sqlite3stmt.close.php">SQLite3Stmt::close</a> — プリペアドステートメントを閉じる</li><li><a href="sqlite3stmt.construct.php">SQLite3Stmt::__construct</a> — SQLite3Stmt オブジェクトを構築する</li><li><a href="sqlite3stmt.execute.php">SQLite3Stmt::execute</a> — プリペアドステートメントを実行し、結果セットオブジェクトを返す</li><li><a href="sqlite3stmt.explain.php">SQLite3Stmt::explain</a> — ステートメントの explain モードを返す</li><li><a href="sqlite3stmt.getsql.php">SQLite3Stmt::getSQL</a> — ステートメントのSQLを取得する</li><li><a href="sqlite3stmt.paramcount.php">SQLite3Stmt::paramCount</a> — プリペアドステートメント内のパラメータの数を返す</li><li><a href="sqlite3stmt.readonly.php">SQLite3Stmt::readOnly</a> — ステートメントが読み取り専用かどうかを返す</li><li><a href="sqlite3stmt.reset.php">SQLite3Stmt::reset</a> — プリペアドステートメントをリセットする</li><li><a href="sqlite3stmt.setexplain.php">SQLite3Stmt::setExplain</a> — ステートメントの explain モードを変更する</li></ul>
</div>
<?php manual_footer($setup); ?>