Pyh.conf’25: a new PHP conference for the Russian-speaking community

Voting

: min(six, three)?
(Example: nine)

The Note You're Voting On

nick
7 years ago
It is not possible to get the values for an enum or set field through fetch_fields(). As far as I can tell this is because it hasn't been implemented in the mysqlnd api but whatever the reason it is not possible and you must issue a query like SHOW COLUMNS directly and interrogate the result to determine them.

Incidentally you need to check the enum_flag rather than look for the enum_type to determine whether a field is enum or not. The type returned is usually some kind of string.

<< Back to user notes page

To Top