JDatabase::loadObject: Difference between revisions
From Joomla! Documentation
Bulk upload by Doxiki2 |
m preparing for archive only |
||
| (6 intermediate revisions by 2 users not shown) | |||
| Line 2: | Line 2: | ||
=={{JVer|11.1}} JDatabase::loadObject== | =={{JVer|11.1}} JDatabase::loadObject== | ||
===Description=== | ===Description=== | ||
Method to get the first row of the result set from the database query as an object. | |||
<source lang="php"> | <source lang="php"> | ||
public | public function loadObject ($class= 'stdClass') | ||
</source> | </source> | ||
= | {| class="wikitable" | ||
|- | |||
!Parameter | |||
libraries/joomla/database/database.php | !Type | ||
!Default | |||
!Description | |||
|- | |||
|$class | |||
| | |||
|'stdClass' | |||
| | |||
|- | |||
|} | |||
* '''Returns''' mixed The return value or null if the query failed. | |||
* '''Defined''' on line 671 of libraries/joomla/database/database.php | |||
* '''Since''' {{JVer|11.1 }} | |||
===See also=== | ===See also=== | ||
* {{JVer|11.1}} '''JDatabase::loadObject source code''' on [[jplatform:database/database.php#cl-663|BitBucket]] | |||
* {{JVer|11.1}} Class [[API17:JDatabase|JDatabase]] | |||
* {{JVer|11.1}} Subpackage [[API17:Subpackage_Database|Database]] | |||
* | * [[API17:JDatabase::loadObject|Other versions of JDatabase::loadObject]] | ||
* [[JDatabase::loadObject|Other versions of | |||
===Examples=== | ===User contributed notes=== | ||
=== Code Examples === | |||
<dpl> | <dpl> | ||
noresultsheader=\n | noresultsheader=\n | ||
category=JDatabase::loadObject | category=JDatabase::loadObject | ||
namespace=CodeExample | |||
category=MethodExample | category=MethodExample | ||
include=* | include=* | ||
namespace=CodeExample | |||
format= ,,, | format= ,,, | ||
</dpl> | </dpl> | ||
<noinclude>[[Category: | <noinclude>[[Category:Platform 11.1]][[Category:Archived pages API17]]</noinclude> | ||
Latest revision as of 02:34, 25 March 2017
JDatabase::loadObject
Description
Method to get the first row of the result set from the database query as an object.
public function loadObject ($class= 'stdClass')
| Parameter | Type | Default | Description |
|---|---|---|---|
| $class | 'stdClass' |
- Returns mixed The return value or null if the query failed.
- Defined on line 671 of libraries/joomla/database/database.php
- Since

See also
JDatabase::loadObject source code on BitBucket
Class JDatabase
Subpackage Database- Other versions of JDatabase::loadObject
User contributed notes
Code Examples