Bug #5411 [NEW]: Example 32-1. raw queries on the database

From: Date: Thu, 15 Sep 2005 09:55:01 +0000
Subject: Bug #5411 [NEW]: Example 32-1. raw queries on the database
Groups: php.pear.doc 
Request: Send a blank email to pear-doc+get-6825@lists.php.net to get a copy of this message
From: alexandre dot barault at gmail dot com Operating system: windows PHP version: 5.0.0 Package: Documentation Bug Type: Bug Bug description: Example 32-1. raw queries on the database Description: ------------ example query. the example is there to demonstrate, you can pass a raw query. but in fast $person->find(); take the primary attention to the script and redefine the query. If you want to use a raw query, you must drop the line with the method find(). Test script: --------------- <?php $person = new DataObjects_Person; $person->query("SELECT * FROM {$person->__table} WHERE id > 12 ORDER BY id"); $person->find(); while ($person->fetch()) { echo $person->name; } ?> Expected result: ---------------- i wait select * from person where id>12 ORDER BY id. Actual result: -------------- the query display select * from person. -- Edit bug report at http://pear.php.net/bugs/bug.php?id=5411&edit=1 --

« previous php.pear.doc (#6825) next »