PDOStatement::execute accepts an array

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@269959 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Jakub Vrana 2008-11-27 21:09:24 +00:00
parent 4c8987f8ba
commit eae37b7815

View file

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.2 $ -->
<!-- $Revision: 1.3 $ -->
<refentry xml:id="pdostatement.fetchall" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>PDOStatement->fetchAll</refname>
@ -177,8 +177,8 @@ Array(3)
<![CDATA[
<?php
$insert = $dbh->prepare("INSERT INTO fruit(name, colour) VALUES (?, ?)");
$insert->execute('apple', 'green');
$insert->execute('pear', 'yellow');
$insert->execute(array('apple', 'green'));
$insert->execute(array('pear', 'yellow'));
$sth = $dbh->prepare("SELECT name, colour FROM fruit");
$sth->execute();