JDatabaseMySQL/loadNextRow: Difference between revisions
From Joomla! Documentation
New page: ===Description===
Load the next row returned by the query.
<span class="editsection" style="font-size:76%;">
<nowiki>[</nowiki>[[Description:JDatabaseMySQL/loadNextRow|Edit Descripton... |
m preparing for archive only |
||
| (2 intermediate revisions by the same user not shown) | |||
| Line 2: | Line 2: | ||
Load the next row returned by the query. | Load the next row returned by the query. | ||
<! removed transcluded page call, red link never existed > | |||
===Syntax=== | ===Syntax=== | ||
| Line 41: | Line 39: | ||
</source> | </source> | ||
<! removed transcluded page call, red link never existed > | |||
< | |||
===Examples=== | ===Examples=== | ||
=== Code Examples === | |||
<dpl> | <dpl> | ||
noresultsheader=\n | noresultsheader=\n | ||
category=loadNextRow | category=loadNextRow | ||
category=JDatabaseMySQL | category=JDatabaseMySQL | ||
namespace=CodeExample | |||
category=MethodExample | category=MethodExample | ||
include=* | include=* | ||
format= ,,, | format= ,,, | ||
</dpl> | </dpl> | ||
[[Category:Archived pages API16]] | |||
Latest revision as of 01:28, 25 March 2017
Description
Load the next row returned by the query.
<! removed transcluded page call, red link never existed >
Syntax
loadNextRow()
Returns
mixed The result of the query as an array, false if there are no more rows, or null on an error.
Defined in
libraries/joomla/database/database/mysql.php
Importing
jimport( 'joomla.database.database.mysql' );
Source Body
public function loadNextRow()
{
static $cur;
if (!($cur = $this->query())) {
return $this->_errorNum ? null : false;
}
if ($row = mysql_fetch_row($cur)) {
return $row;
}
mysql_free_result($cur);
$cur = null;
return false;
}
<! removed transcluded page call, red link never existed >
Examples
Code Examples