This tip is for those who use PEAR MDB2 as your database abstraction layer. There are two nice methods, that are not in documentation, queryRow($query) and queryAll($query).
queryRow($query) - returns an associative array for one record
queryAll($query) - return an associative array for all found records
So for those who like to use arrays (like myself) you don't have to use fetchRow() anymore.
Documentation for this class can be found here.
Subscribe to:
Post Comments (Atom)
1 comment:
Thanks!
I change fetchrows for fetchall in my aplication and work fine.
Post a Comment