Actions

API17

JDatabase::loadObjectList

From Joomla! Documentation

Revision as of 14:41, 10 May 2013 by JoomlaWikiBot (Talk | contribs)

Replacement filing cabinet.png
This Namespace has been archived - Please Do Not Edit or Create Pages in this namespace. Pages contain information for a Joomla! version which is no longer supported. It exists only as a historical reference, will not be improved and its content may be incomplete.

Joomla 11.1 JDatabase::loadObjectList

Description

Method to get an array of the result set rows from the database query where each row is an object.

Description:JDatabase::loadObjectList [Edit Descripton]

public function loadObjectList (
        $key=''
        $class= 'stdClass'
)
Parameter Type Default Description
$key
$class 'stdClass'
  • Returns
  • Defined on line 707 of libraries/joomla/database/database.php

See also

SeeAlso:JDatabase::loadObjectList [Edit See Also]

User contributed notes

Examples

// Create a new query object.           
$db = &JFactory::getDBO();
$query = $db->getQuery(true);
$query->select('cats.description AS description, cats.title AS titel');
$query->from('#__categories AS cats');
$query->where('cats.id="1"');
$db->setQuery($query);
$Category = $db->loadObjectList();


<CodeExamplesForm />