<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.pdostatement.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'it',
  ),
  'this' => 
  array (
    0 => 'pdostatement.setattribute.php',
    1 => 'PDOStatement::setAttribute',
    2 => 'Set a statement attribute',
  ),
  'up' => 
  array (
    0 => 'class.pdostatement.php',
    1 => 'PDOStatement',
  ),
  'prev' => 
  array (
    0 => 'pdostatement.rowcount.php',
    1 => 'PDOStatement::rowCount',
  ),
  'next' => 
  array (
    0 => 'pdostatement.setfetchmode.php',
    1 => 'PDOStatement::setFetchMode',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/pdo/pdostatement/setattribute.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="pdostatement.setattribute" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">PDOStatement::setAttribute</h1>
  <p class="verinfo">(PHP 5 &gt;= 5.1.0, PHP 7, PHP 8, PECL pdo &gt;= 0.2.0)</p><p class="refpurpose"><span class="refname">PDOStatement::setAttribute</span> &mdash; <span class="dc-title">
   Set a statement attribute
  </span></p>

 </div>
 <div class="refsect1 description" id="refsect1-pdostatement.setattribute-description">
  <h3 class="title">Descrizione</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>PDOStatement::setAttribute</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$attribute</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="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>


  <p class="para rdfs-comment">
   Sets an attribute on the statement. Currently, no generic attributes are set but only driver specific:
   <ul class="itemizedlist">
    <li class="listitem"><p class="para"><code class="literal">PDO::ATTR_CURSOR_NAME</code>
     (Firebird and ODBC specific):
     Set the name of cursor for <code class="literal">UPDATE ... WHERE CURRENT OF</code>.
    </p></li>
   </ul>
   Note that driver specific attributes <em>must not</em> be used
   with other drivers.
  </p>

 </div>


 <div class="refsect1 parameters" id="refsect1-pdostatement.setattribute-parameters">
  <h3 class="title">Elenco dei parametri</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">attribute</code></dt>
     <dd>
      <p class="para">
       The attribute to modify.
      </p>
     </dd>
    
    
     <dt><code class="parameter">value</code></dt>
     <dd>
      <p class="para">
       The value to set the <code class="parameter">attribute</code>,
       might require a specific type depending on the attribute.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-pdostatement.setattribute-returnvalues">
  <h3 class="title">Valori restituiti</h3>
  <p class="para">
   Restituisce <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> in caso di successo, <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> in caso di fallimento.
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-pdostatement.setattribute-seealso">
  <h3 class="title">Vedere anche:</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="methodname"><a href="pdo.getattribute.php" class="methodname" rel="rdfs-seeAlso">PDO::getAttribute()</a> - Retrieve a database connection attribute</span></li>
    <li><span class="methodname"><a href="pdo.setattribute.php" class="methodname" rel="rdfs-seeAlso">PDO::setAttribute()</a> - Set an attribute</span></li>
    <li><span class="methodname"><a href="pdostatement.getattribute.php" class="methodname" rel="rdfs-seeAlso">PDOStatement::getAttribute()</a> - Retrieve a statement attribute</span></li>
   </ul>
  </p>
 </div>


</div><?php manual_footer($setup); ?>