references:joomla.framework:database:jdatabase-loadresultarrayTable of Contents
loadResultArray
Returns an array containing a single field from all the rows returned by the database query. Syntaxvoid loadResultArray ( $numinarray )
ExamplesExample $dbo =& JFactory::getDBO(); $query = "SELECT name, bid, clickurl FROM #__banner ORDER BY clickurl"; $dbo->setQuery( $query ); $row =& $dbo->loadResultArray(1); print_r( $row ); might produce: Result Array ( [0] => 5 [1] => 4 [2] => 3 [3] => 1 [4] => 2 ) Discussion |


