PDOStatement :: fetchObject
PDOStatement :: fetchObject - Get the next row and returns as an object. (PHP 5> = 5.1.0, PECL pdo> = 0.2.4)
Explanation
grammar
mixed PDOStatement::fetchObject ([ string $class_name = "stdClass" [, array $ctor_args ]] )
Get the next row and returns as an object. This function (method) is an alternative to using the PDO :: FETCH_CLASS or PDO :: FETCH_OBJ style PDOStatement :: fetch () a.
parameter
class_name
Create a class name.
ctor_args
Elements of this array is passed to the constructor.
return value
Returns a property name corresponds to the column name of the class required for instance, or on failure returns FALSE.