PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Database » DB_DataObject » Bug #1205

quoteEntity() problems

Details

Submitted2004-04-14 09:54 UTC
Fromjeroenl at zwolnet dot com
Assignedalan_k
StatusClosed
PackageDB_DataObject
PHP Version4.3.4
OSindependent
Roadmaps(Not assigned)

Comments

[2004-04-14 09:54 UTC] jeroenl at zwolnet dot com

Description:
------------
It looks like the quoteEntity() functionallity has not been tested (a lot).

(And for those who need it - like me - to prevent the ever growing no reserved (mysql) words making you having to rename about all field, it helps. :)

See also : Bug #819 - DB classes (at least mysql) offer quoteIdentifier() but not quoteEntity(), so you have to add/wrap it.

And two typos found (so far) - and still wrong in CVS:

In DBO::selectAs():
- $s = $DB->quoteEntity($k);
should be
- $s = $DB->quoteEntity($s);

In DBO::joinAdd():
- $objTable = $quoteEntities ? $DB->quoteEntity($objTable) : $obj->__table ;
works better as:
- $objTable = $quoteEntities ? $DB->quoteEntity($obj->__table) : $obj->__table ;

If time ... it looks like having a search and check for all 'quoteEntity(' usage is not a bad idea :).
If I'll find some I'll report the result overhere.