Bug #7703 [NEW]: Document mistake in MDB2
| From: | mikespook at gmail dot com | Date: | Tue, 23 May 2006 04:21:40 +0000 |
| Subject: | Bug #7703 [NEW]: Document mistake in MDB2 | ||
| Groups: | php.pear.doc | ||
| Request: | Send a blank email to pear-doc+get-7943@lists.php.net to get a copy of this message | ||
From: mikespook at gmail dot com
Operating system: Windows
Package version:
PHP version: 5.1.4
Package: Documentation
Bug Type: Bug
Bug description: Document mistake in MDB2
Description:
------------
<?php
// Once you have a valid MDB2 object named $mdb2...
$sql = "INSERT INTO clients (name, address) VALUES ($name, ?address)";
$data = 53;
$affected =& $mdb2->exec($sql);
// Always check that result is not an error
if (PEAR::isError($res)) {
die($affected->getMessage());
}
?>
"if (PEAR::isError($res)) {" the $res is not a valid var.
Actual result:
--------------
should be
<?php
// Once you have a valid MDB2 object named $mdb2...
$sql = "INSERT INTO clients (name, address) VALUES ($name, ?address)";
$data = 53;
$affected =& $mdb2->exec($sql);
// Always check that result is not an error
if (PEAR::isError($affected)) {
die($affected->getMessage());
}
?>
--
Edit bug report at http://pear.php.net/bugs/bug.php?id=7703&edit=1
--