odbc_field_type

(PHP 4, PHP 5)

odbc_field_type — Datatype of a field

Описание

string odbc_field_type ( resource $result_id , int $field_number )

Gets the SQL type of the field referenced by number in the given result identifier.

Список параметров

result_id

The result identifier.

field_number

The field number. Field numbering starts at 1.

Возвращаемые значения

Returns the field type as a string, or FALSE on error.

Коментарии

Returntypes on Access2000
COUNTER  -  Autoincrement
VARCHAR  -  Text
LONGCHAR  -  Memo
INTEGER  -  Number
DATETIME  -  Date/Time
CURRENCY  -  Currency
BIT  -  TRUE/FALSE
LONGBINARY  -  OLE-Object
LONGCHAR  -  Hyperlink

cheers, j.a.z.
2002-07-10 18:30:06
http://php5.kiev.ua/manual/ru/function.odbc-field-type.html
Some fields can be of the following type too : REAL
2006-05-19 08:02:18
http://php5.kiev.ua/manual/ru/function.odbc-field-type.html
Here is the complete list!

Access 2003 as the following teturntypes:

COUNTER  -  Autoincrement
VARCHAR  -  Text
LONGCHAR  -  Memo
INTEGER  -  Number
DATETIME  -  Date/Time
CURRENCY  -  Currency
BIT  -  TRUE/FALSE
LONGBINARY  -  OLE-Object
LONGCHAR  -  Hyperlink
DOUBLE - Double Number
BYTE - Byte Number
2007-01-17 06:21:16
http://php5.kiev.ua/manual/ru/function.odbc-field-type.html
Quick note: as noted below, MS Access type AutoNumber comes across as type COUNTER. What I didn't see mentioned is that PHP interprets type COUNTER as a string, not an integer.

More annoying than anything else, in my particular case; but I'd guess it could bite somebody, somewhere.
2009-08-04 16:40:33
http://php5.kiev.ua/manual/ru/function.odbc-field-type.html
odbc_field_type seems to return the data type of the database backend, not the data types from ODBC documentation.

Example: With my Oracle backend I get data types like "CLOB" and "VARCHAR2" while ODBC only knows SQL_LONGVARCHAR for long character data...
2015-09-15 14:05:46
http://php5.kiev.ua/manual/ru/function.odbc-field-type.html

    Поддержать сайт на родительском проекте КГБ