PHP mysqli_fetch_field 数据类型

2021-12-25 00:00:00 types php mysqli

我需要一些帮助来追踪有关 mysqli 结果对象的 fetch_field 方法中的信息的一些基本信息.

I need some help tracking down a bit of nitty gritty information on the information in the fetch_field method of a mysqli result object.

特别是 type 属性 - 来自 文档似乎该字段返回一个整数...

Specifically the type property - from the documentation it would seem that this field returns an integer...

太好了!

我似乎找不到可以让我将数字转换为相应数据类型的表格.我什至不确定我是在寻找 php 还是 mysql 特定信息.迫不及待我可以自己绘制出来,但我更希望有人能指出我的实际文档.

I just can't seem to find a table that will let me translate the number to it's respective data type. I'm not even sure if I'm looking for php or mysql specific information. Push come to shove I can map it out myself, but I'd much rather if someone can point me to the actual documentation.

我错过了什么?

推荐答案

您可以将此数字与此处列出的各种预定义常量进行比较:

You can compare this number to various predefined constants, which are listed here:

http://www.php.net/manual/en/mysqli.常量.php

例如MYSQLI_TYPE_SHORT

相关文章