references:joomla.framework:database:jdatabase-loadrowlistTable of Contents
loadRowList
Returns an array of database rows with numeric column indexing. Returns null if the query fails. Syntaxarray loadRowList ( $key )
ExamplesExample $database =& JFactory::getDBO(); $sql = "SELECT * FROM #__categories WHERE section = 4"; $database->setQuery( $sql ); $categories = $database->loadRowList( 2 ); print_r( $categories ); might produce: Result Array ( [The CMS] => Array ( [0] => 29 [1] => 0 [2] => The CMS [3] => The CMS [4] => [5] => 4 [6] => left [7] => Information about the software behind Joomla!<br /> [8] => 1 [9] => 0 [10] => 0000-00-00 00:00:00 [11] => [12] => 2 [13] => 0 [14] => 0 [15] => ) [The Project] => Array ( [0] => 25 [1] => 0 [2] => The Project [3] => The Project [4] => [5] => 4 [6] => left [7] => General facts about Joomla!<br /> [8] => 1 [9] => 0 [10] => 0000-00-00 00:00:00 [11] => [12] => 1 [13] => 0 [14] => 0 [15] => ) [The Community] => Array ( [0] => 30 [1] => 0 [2] => The Community [3] => The Community [4] => [5] => 4 [6] => left [7] => About the millions of Joomla! users and websites<br /> [8] => 1 [9] => 0 [10] => 0000-00-00 00:00:00 [11] => [12] => 3 [13] => 0 [14] => 0 [15] => ) ) Discussion |


