API17

JDatabase::loadObject: Difference between revisions

From Joomla! Documentation

Doxiki2 (talk | contribs)
Layout updates
Doxiki2 (talk | contribs)
Updated to r1448:247ba8d88526
Line 2: Line 2:
=={{JVer|11.1}} JDatabase::loadObject==
=={{JVer|11.1}} JDatabase::loadObject==
===Description===
===Description===
This global function loads the first row of a query into an object.  
Method to get the first row of the result set from the database query as an object.  


{{Description:JDatabase::loadObject}}
{{Description:JDatabase::loadObject}}
Line 8: Line 8:
<nowiki>[</nowiki>[[Description:JDatabase::loadObject|Edit Descripton]]<nowiki>]</nowiki>
<nowiki>[</nowiki>[[Description:JDatabase::loadObject|Edit Descripton]]<nowiki>]</nowiki>
</span>
</span>
===Synopsis===
<source lang="php">
<source lang="php">
public JDatabase::loadObject ()
public function loadObject ($class= 'stdClass')
</source>
</source>
===Returns===
{| class="wikitable"
object
|-
===Defined in===
!Parameter
libraries/joomla/database/database.php (line 677)
!Type
* see source code in [[jplatform:database/database.php#cl-677|BitBucket]]
!Default
===Referenced by===
!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 [[JDatabase/11.1|JDatabase]]
* {{JVer|11.1}} Subpackage [[Subpackage_Database/11.1|Database]]
* [[JDatabase::loadObject|Other versions of JDatabase::loadObject]]
{{SeeAlso:JDatabase::loadObject}}
<span class="editsection" style="font-size:76%;">
<span class="editsection" style="font-size:76%;">
<nowiki>[</nowiki>[[SeeAlso:JDatabase::loadObject|Edit See Also]]<nowiki>]</nowiki>
<nowiki>[</nowiki>[[SeeAlso:JDatabase::loadObject|Edit See Also]]<nowiki>]</nowiki>
</span>
</span>
* [[JDatabase/11.1|JDatabase]]
===User contributed notes===
* [[JDatabase::loadObject|Other versions of this method]]
{{SeeAlso:JDatabase::loadObject}}
===Examples===
<CodeExamplesForm />
<CodeExamplesForm />
<dpl>
<dpl>
Line 33: Line 44:
category=MethodExample
category=MethodExample
include=*
include=*
namespace=CodeExample
format= ,,,
format= ,,,
</dpl>
</dpl>
<noinclude>[[Category:JDatabase]][[Category:JDatabase::loadObject]]</noinclude>
<noinclude>[[Category:JDatabase]][[Category:JDatabase::loadObject]]</noinclude>

Revision as of 01:26, 28 April 2011

Joomla 11.1 JDatabase::loadObject

Description

Method to get the first row of the result set from the database query as an object.

Template:Description:JDatabase::loadObject [Edit Descripton]

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 Joomla 11.1

See also

Template:SeeAlso:JDatabase::loadObject [Edit See Also]

User contributed notes

<CodeExamplesForm />