mysql_stmt_result_metadata使用_MySQL 5.1 英文手册 :: 21.9.7.22 mysql_stmt_result_metadata()

21.9.7.22. mysql_stmt_result_metadata()

MYSQL_RES *mysql_stmt_result_metadata(MYSQL_STMT

*stmt)

Description

If a statement passed to

mysql_stmt_prepare() is one that

produces a result set,

mysql_stmt_result_metadata()

returns the result set metadata in the form of a pointer to a

MYSQL_RES structure that can be used to

process the meta information such as total number of fields and

individual field information. This result set pointer can be

passed as an argument to any of the field-based API functions

that process result set metadata, such as:

The result set structure should be freed when you are done with

it, which you can do by passing it to

mysql_free_result(). This is

similar to the way you free a result set obtained from a call to

mysql_store_result().

The result set returned by

mysql_stmt_result_metadata()

contains only metadata. It does not contain any row results. The

rows are obtained by using the statement handle with

mysql_stmt_fetch().

Return Values

A MYSQL_RES result structure.

NULL if no meta information exists for the

prepared query.

Errors

An unknown error occurred.

Example

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值