PHP PDOStatement:: fetchObject Explanation
- 2021-11-14 05:08:10
- OfStack
PDOStatement::fetchObject
PDOStatement:: fetchObject--Gets the next 1 row and returns it as an object. (PHP 5 > = 5.1.0, PECL pdo > = 0.2.4)
Description
Grammar
mixed PDOStatement::fetchObject ([ string $class_name = "stdClass" [, array $ctor_args ]] )
Gets the next 1 row and returns it as 1 object. This function (method) is in the style of PDO:: FETCH_CLASS or PDO:: FETCH_OBJ
PDOStatement::fetch()
1 substitution of.
Parameter
class_name
ctor_args
Return value
Returns 1 instance of the required class whose attribute name corresponds to the column name, or FALSE on failure.
Summarize