php8.5
Home/ Manual/ reference / pdo/ The PDORow class

The PDORow class

Represents a row from a result set returned by PDOStatement::fetch called with PDO::FETCH_LAZY fetch mode.

Intro

Represents a row from a result set returned by PDOStatement::fetch called with PDO::FETCH_LAZY fetch mode.

Objects of this class cannot be instantiated and are not serializable.

The PDORow object allows access to the returned data as if both PDO::FETCH_OBJ and PDO::FETCH_BOTH mode were used. This means that the returned data can be accessed as object properties, and as an array both indexed by the column name and a column offset number.

Caution

Accessing an undefined property returns null without emitting a warning.

Class synopsis

final PDORow { }

Properties

queryString

Query string used by the PDOStatement that returned the PDORow object.

Errors/Exceptions

Throws an Error when trying to write to or unset() any property.

Source: reference/pdo/pdorow.xml · from the official PHP manual (php/doc-en)