ingres_fetch_assoc

(PECL ingres >= 2.2.2)

ingres_fetch_assocFetch a row of result into an associative array

说明

ingres_fetch_assoc ( resource $result ) : array

This function is stores the data fetched from a query executed using ingres_query() in an associative array, using the field names as keys.

With regard to speed, the function is identical to ingres_fetch_object(), and almost as quick as ingres_fetch_row() (the difference is insignificant).

By default, arrays created by ingres_fetch_assoc() start from position 1 and not 0 as with other DBMS extensions. The starting position can be adjusted to 0 using the configuration parameter ingres.array_index_start.

Note: Related Configurations

See also the ingres.array_index_start, ingres.fetch_buffer_size and ingres.utf8 directives in Runtime Configuration.

参数

result

The query result identifier

返回值

Returns an associative array that corresponds to the fetched row, or FALSE if there are no more rows

范例

Example #1 Fetch a row into an associative array

<?php
$link 
ingres_connect($database$user$password);

$result ingres_query($link,"select * from table");
while (
$row ingres_fetch_assoc($result)) {
    echo 
$row["user_id"];  // using associative array
    
echo $row["fullname"];
}
?>

参见

add a note add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top 重庆肘时彩官网 浙江6十1怎么算中奖 湖北30选5彩票彩控 怎样看股票的日k线 今晚开码结果查询开奖 今日大盘上证指数多少点 免费资料一起中奖 群英会20选5中奖规则 有融资融券的股票好 双色球最精准十个专家 山东11选五开奖结果查 太平洋保险股票代码 内蒙古快3和值振幅走 贵州快3走势图500期 彩票争霸app下载安装 广西快乐十分开奖 东方6 1 中国体彩网