PHP PDO ODBC getColumnMeta: native_type is missing in result array

  Kiến thức lập trình

I need to find out the column type of columns in a query:

$columnmeta = $stmt->getColumnMeta($column);

In the resulting array the native_type is missing, there is only pdo_type, which is pretty much useless since PDO seems to treat everything as a string.

In the manual it is stated “Warning:Some drivers may not implement PDOStatement::getColumnMeta(), as it is optional. However, all PDO drivers documented in the manual implement this function.”

Since ODBC is documented, this should be there…is there something I can do about it? Or is there a different way to find out the column type?

Thanks in advance!

2

Theme wordpress giá rẻ Theme wordpress giá rẻ Thiết kế website Kho Theme wordpress Kho Theme WP Theme WP

LEAVE A COMMENT