mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
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:
parent
4c8987f8ba
commit
eae37b7815
1 changed files with 3 additions and 3 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue