PHP » GoLang |
login |
register |
about
|
GoLang sqlsrv_fetch_object
request it (448)
GoLang replacement for PHP's sqlsrv_fetch_object
[edit | history]
sqlsrv_fetch_object(No version information available, might only be in Git) sqlsrv_fetch_object — Retrieves the next row of data in a result set as an object Description
mixed sqlsrv_fetch_object
( resource
$stmt
[, string $className
[, array $ctorParams
[, int $row
[, int $offset
]]]] )Retrieves the next row of data in a result set as an instance of the specified class with properties that match the row field names and values that correspond to the row field values. Parameters
Return Values
Returns an object on success, Examples
Example #1 sqlsrv_fetch_object() example The following example demonstrates how to retrieve a row as a stdClass object.
<?php NotesIf a class name is specified with the optional $className parameter and the class has properties whose names match the result set field names, the corresponding result set values are applied to the properties. If a result set field name does not match a class property, a property with the result set field name is added to the object and the result set value is applied to the property. The following rules apply when using the $className parameter:
When consuming a result set that has multiple columns with the same name, it may be better to use sqlsrv_fetch_array() or the combination of sqlsrv_fetch() and sqlsrv_get_field(). See Also
|
more
Recently updated
more
Most requested
more
Last requests
|