PEAR DB_DataObject

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



It seems to me that the factory command in the DB_DataObject database
abstraction layer class from PEAR, brings back all fields from the
database to PHP.  Is that correct?

(assuming a single record table)
$record = DB_DataObject::factory( 'mytable' );
$record->find();
echo $record->data1 . ' : ' . $record->data2;

Doesn't that fetch all the fields, then throw away the ones that aren't
needed?  It sounds like SELECT * FROM mytable, which we are always told
is a Bad Thing.

-- 
Pete Clark


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux