| ユーザフォーラムで議論/質問 | マニュアル検索 | ハイライト | ハイライトオフ | ポータル | php spot |
sqlsrv_fetch_object(バージョン情報なし。おそらく SVN 版にしか存在しないでしょう) 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, 例
例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(). 参考
|
各種マニュアル:
PHPマニュアル |
PEARマニュアル |
Smarty(英語)マニュアル |
PHP-GTKマニュアル |
「sqlsrv_fetch_object - Retrieves the next row of data in a result set as an object」をGoogle検索
|