About: 21000 results

getAll() – Runs a query and returns all the data as an array - PHP
https://pear.php.net/manual/en/package.database.db ...
$db->setFetchMode(DB_FETCHMODE_ASSOC); $data =& $db->getAll('SELECT cf, nf, df FROM foo'); if (PEAR::isError($data)) { die($data->getMessage()); }
Manual :: Fetch all rows - PHP
https://pear.php.net/manual/en/package.database.md ...
MDB_Common::getAll(). MDB_Common::getAll() – Fetch all rows. Synopsis. require_once 'MDB.php';. array &getAll ( string $query , array $types ...
Manual :: DB - PHP
https://pear.php.net/manual/en/package.database.db ...
DB. A unified API for accessing SQL databases ... DB_common::getOption() — Determines current state of a PEAR DB configuration option; DB_common::getRow() ...
getAssoc() – Runs a query and returns the data as an array - PHP
https://pear.php.net/manual/en/package.database.db ...
Once you have a valid DB object named $db... $data =& $db->getAssoc('SELECT cf, df FROM foo'); if (PEAR::isError($data)) { die($data->getMessage()); }
getCol() – Runs a query and returns the data from a single column
https://pear.php.net/manual/en/package.database.db ...
<?php // Once you have a valid DB object named $db... $data =& $db->getCol('SELECT cf, df FROM foo'); if (PEAR::isError($data)) { die($data->getMessage()); }
DB_common::getRow() – Runs a query and returns the first row - PHP
https://pear.php.net/manual/en/package.database.db ...
Once you have a valid DB object named $db... $data =& $db->getRow('SELECT cf, df FROM foo', array(), DB_FETCHMODE_ORDERED); if (PEAR::isError($data)) {
Manual :: Comparison of get* methods - PHP
https://pear.php.net/manual/en/package.database.db ...
require_once 'DB.php'; $db = DB::connect('mysql://user:pass@localhost/example'); var_dump( ... getAll() fetches all columns from all rows into an array.
Manual :: Executes a prepared SQL statement - PHP
https://pear.php.net/manual/en/package.database.db ...
Once you have a valid DB object named $db... $sth = $db->prepare('INSERT INTO numbers (number) VALUES (?)'); if (PEAR::isError($sth)) {
Manual :: Performing queries - PHP
https://pear.php.net/manual/en/package.database.db ...
Introduction - Query. Introduction - Query – Performing queries. Description. PEAR DB provides several methods for querying databases. The most direct method is ...
10.5. Retrieving Rows Without a Loop - PHP Cookbook [Book]
https://www.oreilly.com/library/view/php-cookbook/ ...
Solution With PEAR DB, use DB::getRow( ) to … - Selection from PHP Cookbook [Book] ... Use DB::getAll( ) to retrieve all rows from a query: