Actions

API17

Difference between revisions of "JDatabaseMySQL::getNumRows"

From Joomla! Documentation

(Layout updates)
(Updated to r1448:247ba8d88526)
Line 2: Line 2:
 
=={{JVer|11.1}} JDatabaseMySQL::getNumRows==
 
=={{JVer|11.1}} JDatabaseMySQL::getNumRows==
 
===Description===
 
===Description===
Description.  
+
Get the number of returned rows for the previous executed SQL statement.  
  
 
{{Description:JDatabaseMySQL::getNumRows}}
 
{{Description:JDatabaseMySQL::getNumRows}}
Line 8: Line 8:
 
<nowiki>[</nowiki>[[Description:JDatabaseMySQL::getNumRows|Edit Descripton]]<nowiki>]</nowiki>
 
<nowiki>[</nowiki>[[Description:JDatabaseMySQL::getNumRows|Edit Descripton]]<nowiki>]</nowiki>
 
</span>
 
</span>
===Synopsis===
 
 
<source lang="php">
 
<source lang="php">
public JDatabaseMySQL::getNumRows ($cur=null)
+
public function getNumRows ($cursor=null)
 
</source>
 
</source>
 
{| class="wikitable"
 
{| class="wikitable"
Line 19: Line 18:
 
!Description
 
!Description
 
|-
 
|-
|$cur
+
|$cursor
|
+
|resource
 
|null
 
|null
|
+
|An optional database cursor resource to extract the row count from.
 
|-
 
|-
 
|}
 
|}
===Returns===
+
* '''Returns''' integer The number of returned rows.
int The number of rows returned from the most recent query.
+
* '''Defined''' on line 264 of libraries/joomla/database/database/mysql.php
===Defined in===
+
* '''Since''' {{JVer|11.1 }}
libraries/joomla/database/database/mysql.php (line 353)
+
* see source code in [[jplatform:database/database/mysql.php#cl-353|BitBucket]]
+
===Referenced by===
+
 
===See also===
 
===See also===
 +
* {{JVer|11.1}} '''JDatabaseMySQL::getNumRows source code''' on [[jplatform:database/database/mysql.php#cl-256|BitBucket]]
 +
* {{JVer|11.1}} Class [[JDatabaseMySQL/11.1|JDatabaseMySQL]]
 +
* {{JVer|11.1}} Subpackage [[Subpackage_Database/11.1|Database]]
 +
* [[JDatabaseMySQL::getNumRows|Other versions of JDatabaseMySQL::getNumRows]]
 +
{{SeeAlso:JDatabaseMySQL::getNumRows}}
 
<span class="editsection" style="font-size:76%;">
 
<span class="editsection" style="font-size:76%;">
 
<nowiki>[</nowiki>[[SeeAlso:JDatabaseMySQL::getNumRows|Edit See Also]]<nowiki>]</nowiki>
 
<nowiki>[</nowiki>[[SeeAlso:JDatabaseMySQL::getNumRows|Edit See Also]]<nowiki>]</nowiki>
 
</span>
 
</span>
* [[JDatabaseMySQL/11.1|JDatabaseMySQL]]
+
===User contributed notes===
* [[JDatabaseMySQL::getNumRows|Other versions of this method]]
+
{{SeeAlso:JDatabaseMySQL::getNumRows}}
+
===Examples===
+
 
<CodeExamplesForm />
 
<CodeExamplesForm />
 
<dpl>
 
<dpl>
Line 46: Line 44:
 
category=MethodExample
 
category=MethodExample
 
include=*
 
include=*
 +
namespace=CodeExample
 
format= ,,,
 
format= ,,,
 
</dpl>
 
</dpl>
 
<noinclude>[[Category:JDatabaseMySQL]][[Category:JDatabaseMySQL::getNumRows]]</noinclude>
 
<noinclude>[[Category:JDatabaseMySQL]][[Category:JDatabaseMySQL::getNumRows]]</noinclude>

Revision as of 20:31, 27 April 2011

Replacement filing cabinet.png
This Namespace has been archived - Please Do Not Edit or Create Pages in this namespace. Pages contain information for a Joomla! version which is no longer supported. It exists only as a historical reference, will not be improved and its content may be incomplete.

Joomla 11.1 JDatabaseMySQL::getNumRows

Description

Get the number of returned rows for the previous executed SQL statement.

Description:JDatabaseMySQL::getNumRows [Edit Descripton]

public function getNumRows ($cursor=null)
Parameter Type Default Description
$cursor resource null An optional database cursor resource to extract the row count from.
  • Returns integer The number of returned rows.
  • Defined on line 264 of libraries/joomla/database/database/mysql.php
  • Since Joomla 11.1

See also

SeeAlso:JDatabaseMySQL::getNumRows [Edit See Also]

User contributed notes

<CodeExamplesForm />