JDatabaseIteratorPdomysql

Extends \JDatabaseIteratorPdo

MySQL database iterator for the PDO based MySQL database driver.

package

Joomla.Platform

subpackage

Database

link

https://dev.mysql.com/doc/

since

3.4

Methods

__construct

Database iterator constructor.

__construct(mixed $cursor, string $column = null, string $class = 'stdClass') 
inherited
throws

\InvalidArgumentException

Arguments

$cursor

mixedThe database cursor.

$column

stringAn option column to use as the iterator key.

$class

stringThe class of object that is returned.

__destruct

Database iterator destructor.

__destruct() 
inherited
since

12.1

count

Get the number of rows in the result set for the executed SQL given by the cursor.

count() : integer
inherited
since

12.1

see \Countable::count()

Response

integerThe number of rows in the result set.

current

The current element in the iterator.

current() : object
inherited
see \Iterator::current()
since

12.1

Response

object

fetchObject

Method to fetch a row from the result set cursor as an object.

fetchObject() : mixed
inherited abstract
since

12.1

Response

mixedEither the next row from the result set or false if there are no more rows.

freeResult

Method to free up the memory used for the result set.

freeResult() : void
inherited abstract
since

12.1

key

The key of the current element in the iterator.

key() : integer|string
inherited
see \Iterator::key()
since

12.1

Response

integer|string

next

Moves forward to the next result from the SQL query.

next() : void
inherited
see \Iterator::next()
since

12.1

rewind

Rewinds the iterator.

rewind() : void
inherited

This iterator cannot be rewound.

see \Iterator::rewind()
since

12.1

valid

Checks if the current position of the iterator is valid.

valid() : boolean
inherited
see \Iterator::valid()
since

12.1

Response

boolean

Properties

cursor

The database cursor.

inherited

Type(s)

mixed

class

The class of object to create.

inherited

Type(s)

string

_column

The name of the column to use for the key of the database record.

inherited

Type(s)

mixed

_current

The current database record.

inherited

Type(s)

mixed

_key

A numeric or string key for the current database record.

inherited

Type(s)

integer|string

_fetched

The number of fetched records.

inherited

Type(s)

integer