Easy Tutorial
❮ Func Math Cos Php Form Complete ❯

PDOStatement::fetchObject

PHP PDO Reference Manual

PDOStatement::fetchObject — Fetch the next row and return it as an object. (PHP 5 >= 5.1.0, PECL pdo >= 0.2.4)


Description

Syntax

mixed PDOStatement::fetchObject ([ string $class_name = "stdClass" [, array $ctor_args ]] )

Fetches the next row and returns it as an object. This function (method) is an alternative to PDOStatement::fetch() using PDO::FETCH_CLASS or PDO::FETCH_OBJ style.


Parameters

class_name

The name of the class to create.

ctor_args

Elements of this array are passed to the constructor.


Return Value

Returns an instance of the requested class with property names that correspond to the column names, or FALSE on failure.


PHP PDO Reference Manual

❮ Func Math Cos Php Form Complete ❯