downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

Our source is open

The syntax highlighted source is automatically generated by PHP from the plaintext script. If you're interested in what's behind the several functions we used, you can always take a look at the source of the following files:

Of course, if you want to see the source of this page, we have it available. You can also browse the SVN repository for this website on svn.php.net.

Source of: /manual/en/pdostatement.setattribute.php

<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = 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 => 'en',
  ),
 
'this' =>
  array (
   
0 => 'pdostatement.setattribute.php',
   
1 => 'PDOStatement->setAttribute',
  ),
 
'up' =>
  array (
   
0 => 'class.pdostatement.php',
   
1 => 'The PDOStatement class',
  ),
 
'prev' =>
  array (
   
0 => 'pdostatement.rowcount.php',
   
1 => 'PDOStatement->rowCount',
  ),
 
'next' =>
  array (
   
0 => 'pdostatement.setfetchmode.php',
   
1 => 'PDOStatement->setFetchMode',
  ),
);
$setup["toc"] = $TOC;
$setup["parents"] = $PARENTS;
manual_setup($setup);

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

 </div>
 <a name="pdostatement.setattribute.description"></a><div class="refsect1 description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">bool</span> <span class="methodname"><b>PDOStatement::setAttribute</b></span>
    ( <span class="methodparam"><span class="type">int</span> <tt class="parameter">$attribute</tt></span>
   , <span class="methodparam"><span class="type"><a href="language.pseudo-types.php#language.types.mixed" class="type mixed">mixed</a></span> <tt class="parameter">$value</tt></span>
   )</div>


  <p class="para rdfs-comment">
   Sets an attribute on the statement. Currently, no generic attributes are set but only driver specific:
   </p><ul class="itemizedlist">
    <li class="listitem"><p class="para"><i>PDO::ATTR_CURSOR_NAME</i>
     (Firebird and ODBC specific):
     Set the name of cursor for <i>UPDATE ... WHERE CURRENT OF</i>.
    </p></li>
   </ul><p>
  </p>

 </div>


 <a name="pdostatement.setattribute.returnvalues"></a><div class="refsect1 returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
   Returns <b><tt class="constant">TRUE</tt></b> on success or <b><tt class="constant">FALSE</tt></b> on failure.
  </p>
 </div>


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


</div><?php manual_footer(); ?>
 
show source | credits | sitemap | contact | advertising | mirror sites