Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP mysqli_fetch_field data type

Tags:

types

php

mysqli

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.

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

Great!

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.

What am I missing?

like image 527
Crazy Joe Malloy Avatar asked Nov 07 '09 00:11

Crazy Joe Malloy


1 Answers

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

http://www.php.net/manual/en/mysqli.constants.php

e.g. MYSQLI_TYPE_SHORT

like image 171
Ben James Avatar answered Sep 20 '22 12:09

Ben James