PDOSTATEMENT.FETCHOBJECT(3) 1 PDOSTATEMENT.FETCHOBJECT(3)
PDOStatement::fetchObject - Fetches the next row and returns it as an object.
SYNOPSIS
public mixed PDOStatement::fetchObject ([string $class_name = "stdClass"], [array $ctor_args])
DESCRIPTION
Fetches the next row and returns it as an object. This function is an alternative to PDOStatement.fetch(3) with PDO::FETCH_CLASS or
PDO::FETCH_OBJ style.
PARAMETERS
o $class_name
- Name of the created class.
o $ctor_args
- Elements of this array are passed to the constructor.
RETURN VALUES
Returns an instance of the required class with property names that correspond to the column names or FALSE on failure.
SEE ALSO
PDOStatement.fetch(3).
PHP Documentation Group PDOSTATEMENT.FETCHOBJECT(3)