Bug #5411 [Opn->Dup]: Example 32-1. raw queries on the database
| From: | arnaud@php.net | Date: | Thu, 22 Sep 2005 08:33:03 +0000 |
| Subject: | Bug #5411 [Opn->Dup]: Example 32-1. raw queries on the database | ||
| References: | 1 | Groups: | php.pear.doc |
| Request: | Send a blank email to pear-doc+get-6877@lists.php.net to get a copy of this message | ||
Edit report at http://pear.php.net/bugs/bug.php?id=5411&edit=1
ID: 5411
Updated by: arnaud@php.net
Reported By: alexandre dot barault at gmail dot com
-Status: Open
+Status: Duplicate
Id: 5411
Type: Bug
Package: Documentation
Operating System: windows
PHP Version: 5.0.0
New Comment:
Duplicate of #5383
Previous Comments:
------------------------------------------------------------------------
[2005-09-15 05:55:00] alexandre dot barault at gmail dot com
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 this bug report at http://pear.php.net/bugs/bug.php?id=5411&edit=1