update : 2015.11.03
php.shukuma.com검색:
|
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 설명
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. 인수
반환값
Returns an object on success, 예제
Example #1 sqlsrv_fetch_object() example The following example demonstrates how to retrieve a row as a stdClass object.
<?php 주의If 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(). 참고
|