JDatabaseMySQLi/loadAssoc: Difference between revisions
From Joomla! Documentation
m removing red link to edit, no existant pages |
m preparing for archive only |
||
| Line 42: | Line 42: | ||
===Examples=== | ===Examples=== | ||
=== Code Examples === | |||
<dpl> | <dpl> | ||
noresultsheader=\n | noresultsheader=\n | ||
category=loadAssoc | category=loadAssoc | ||
category=JDatabaseMySQLi | category=JDatabaseMySQLi | ||
namespace=CodeExample | |||
category=MethodExample | category=MethodExample | ||
include=* | include=* | ||
Latest revision as of 00:28, 25 March 2017
Description
Fetch a result row as an associative array
[<! removed edit link to red link >]
<! removed transcluded page call, red link never existed >
Syntax
loadAssoc()
Returns
array
Defined in
libraries/joomla/database/database/mysqli.php
Importing
jimport( 'joomla.database.database.mysqli' );
Source Body
function loadAssoc()
{
if (!($cur = $this->query())) {
return null;
}
$ret = null;
if ($array = mysqli_fetch_assoc( $cur )) {
$ret = $array;
}
mysqli_free_result( $cur );
return $ret;
}
[<! removed edit link to red link >] <! removed transcluded page call, red link never existed >
Examples
Code Examples