ODBC 函数
在线手册:中文  英文

odbc_field_type

(PHP 4, PHP 5)

odbc_field_typeDatatype 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.


ODBC 函数
在线手册:中文  英文

用户评论:

jschwartz at the-infoshop dot com (2009-08-04 13:40:33)

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.

jorge dot emailNOSPAM at gmail dot com (2007-01-17 04:21:16)

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

not[at]wgpower[dot]net (2006-05-19 05:02:18)

Some fields can be of the following type too : REAL

jazper at lycos dot de (2002-07-10 15:30:06)

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.

易百教程