-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Philip Iezzi wrote:
> Bill Karwin wrote:
>> As of revision 3995, the find() method always returns an object of type 
>> Zend_Db_Table_Rowset_Abstract.
> 
> What's the easiest recommended way of getting a row by id?
> If I'd like to get the row object in a single line of code, could I use 
> current() or is there a better way?
> 
> $customerTbl = new My_Db_Table_Customer(); // My_Db_Table_Customer extends 
> Zend_Db_Table
> $row = $customerTbl->find(5)->current();
> 

I'm using

$row = $tbl->fetchRow('id='.$id);

as it's marginally less typing.


Does anyone do $tbl->find(1); and find a rowset usable?

Regards,

Rob...
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFF+pNH421+qn4cITwRAq2yAJ9Wmwee2uSsRvgNjYrddjHmvNsxbACfVxHH
cjF7yEKeoyJc452rPmEAeP4=
=Hi11
-----END PGP SIGNATURE-----

Reply via email to