php oci result 列名,返回所取得行中字段的值 - PHP 7 中文文档

(PHP 5, PHP 7, PECL OCI8 >= 1.1.0)

oci_result – 返回所取得行中字段的值

说明

oci_result

( resource $statement

, [mixed](php7/language.pseudo-types) $field

) : [mixed](php7/language.pseudo-types)

oci_result() 返回由 [oci_fetch()](php7/function.oci-fetch)

所取得的当前行中 field

字段的数据。oci_result()

对所有类型都返回字符串只除了抽象类型(ROWID,LOB 和

FILE)。oci_result() 在出错时返回 FALSE。

可以使用列序号(从 1 开始)或列名(大写)作为

col 的参数。

Note:

在 PHP 5.0.0 之前的版本必须使用 [ociresult()](php7/function.ociresult)

替代本函数。该函数名仍然可用,为向下兼容作为

oci_result() 的别名。不过其已被废弃,不推荐使用。

要获取 OCI8

扩展进行数据类型映射的细节,请参见[驱动所支持的数据类型](php7/oci8.datatypes)。

参见 [oci_fetch_array()](php7/function.oci-fetch-array),[oci_fetch_assoc()](php7/function.oci-fetch-assoc),[oci_fetch_object()](php7/function.oci-fetch-object),[oci_fetch_row()](php7/function.oci-fetch-row)

和 [oci_fetch_all()](php7/function.oci-fetch-all)。

参数

statement

field

Can be either use the column number (1-based) or the column name (in

uppercase).

返回值

Returns everything as strings except for abstract types (ROWIDs, LOBs and

FILEs). Returns FALSE on error.

注释

Note:

In PHP versions before 5.0.0 you must use [ociresult()](php7/function.ociresult) instead.

This name still can be used, it was left as alias of

oci_result() for downwards compatability.

This, however, is deprecated and not recommended.

参见

[oci_fetch_array()](php7/function.oci-fetch-array) – Returns the next row from a query as an associative or numeric array

[oci_fetch_assoc()](php7/function.oci-fetch-assoc) – Returns the next row from a query as an associative array

[oci_fetch_object()](php7/function.oci-fetch-object) – Returns the next row from a query as an object

[oci_fetch_row()](php7/function.oci-fetch-row) – Returns the next row from a query as a numeric array

[oci_fetch_all()](php7/function.oci-fetch-all) – 获取结果数据的所有行到一个数组

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值