Sorry, I am the last person to question the docs....as I haven't even started using the lib yet...

From: Date: Tue, 10 Dec 2002 20:17:47 +0000
Subject: Sorry, I am the last person to question the docs....as I haven't even started using the lib yet...
Groups: php.pear.doc 
Request: Send a blank email to pear-doc+get-109@lists.php.net to get a copy of this message
On the fetch page: http://pear.php.net/manual/en/core.db.tut_fetch.php Should these two examples in the docs be $db->getAssoc and $db->getAll? getAssoc() fetches the entire result set of a query and return it as an associative array using the first column as the key. <?php$data = getAssoc('SELECT name, surname, phone FROM mytable')/*Will return:array( 'Peter' => array('Smith', '944679408'), 'Tomas' => array('Cox', '944679408'), 'Richard' => array('Merz', '944679408'))*/?> getAll() fetches all the rows returned from a query <?php$data = getAll('SELECT id, text, date FROM mytable');/*Will return:array( 1 => array('4', 'four', '2004'), 2 => array('5', 'five', '2005'), 3 => array('6', 'six', '2006'))*/?> +++++++++++++++++++++++++++++++ Robert Granger Diamond Offshore Drilling, Inc. Manager of Computer Systems 281.492.5330 :Office 281.647.4025 :Fax When I die, I would like to go peacefully, in my sleep, like my Grandfather did. Not screaming and yelling like the passenger in his car. -Jack Handy

« previous php.pear.doc (#109) next »