API17

Difference between revisions of "JDatabase::loadAssoc"

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::loadAssoc==
 
=={{JVer|11.1}} JDatabase::loadAssoc==
 
===Description===
 
===Description===
Fetch a result row as an associative array.  
+
Method to get the first row of the result set from the database query as an associative array of ['field_name' => 'row_value'].  
 +
 
 +
 
  
{{Description:JDatabase::loadAssoc}}
 
<span class="editsection" style="font-size:76%;">
 
<nowiki>[</nowiki>[[Description:JDatabase::loadAssoc|Edit Descripton]]<nowiki>]</nowiki>
 
</span>
 
===Synopsis===
 
 
<source lang="php">
 
<source lang="php">
public JDatabase->loadAssoc ()
+
public function loadAssoc ()
 
</source>
 
</source>
===Returns===
+
{| class="wikitable"
 +
|-
 +
!Parameter
 +
!Type
 +
!Default
 +
!Description
 +
|-
 +
|
 +
|
 +
|
 +
|
 +
|-
 +
|}
 +
* '''Returns''' mixed The return value or null if the query failed.
 +
* '''Defined''' on line 535 of libraries/joomla/database/database.php
 +
* '''Since''' {{JVer|11.1 }}
 +
===See also===
 +
* {{JVer|11.1}} '''JDatabase::loadAssoc source code''' on [[jplatform:database/database.php#cl-527|BitBucket]]
 +
* {{JVer|11.1}} Class [[API17:JDatabase|JDatabase]]
 +
* {{JVer|11.1}} Subpackage [[API17:Subpackage_Database|Database]]
 +
* [[API17:JDatabase::loadAssoc|Other versions of JDatabase::loadAssoc]]
  
===Defined in===
+
 
libraries/joomla/database/database.php
+
===User contributed notes===
===Referenced by===
+
=== Code Examples ===
===See also===
 
<span class="editsection" style="font-size:76%;">
 
<nowiki>[</nowiki>[[SeeAlso:JDatabase::loadAssoc|Edit See Also]]<nowiki>]</nowiki>
 
</span>
 
* [[JDatabase/11.1|JDatabase]]
 
* [[JDatabase::loadAssoc|Other versions of this method]]
 
{{SeeAlso:JDatabase::loadAssoc}}
 
===Examples===
 
<CodeExamplesForm />
 
 
<dpl>
 
<dpl>
 
noresultsheader=\n
 
noresultsheader=\n
 
category=JDatabase::loadAssoc
 
category=JDatabase::loadAssoc
category=CodeExample
+
namespace=CodeExample
 
category=MethodExample
 
category=MethodExample
 
include=*
 
include=*
 +
namespace=CodeExample
 
format= ,,,
 
format= ,,,
 
</dpl>
 
</dpl>
<noinclude>[[Category:JDatabase]][[Category:JDatabase::loadAssoc]]</noinclude>
+
<noinclude>[[Category:Platform 11.1]][[Category:Archived pages API17]]</noinclude>

Latest revision as of 21:34, 24 March 2017

The "API17" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.

Joomla 11.1 JDatabase::loadAssoc[edit]

Description[edit]

Method to get the first row of the result set from the database query as an associative array of ['field_name' => 'row_value'].


public function loadAssoc ()
Parameter Type Default Description
  • Returns mixed The return value or null if the query failed.
  • Defined on line 535 of libraries/joomla/database/database.php
  • Since Joomla 11.1

See also[edit]


User contributed notes[edit]

Code Examples[edit]