odbc_field_type

(PHP 4, PHP 5, PHP 7, PHP 8)

odbc_field_typeDatentyp eines Feldes

Beschreibung

odbc_field_type(Odbc\Result $statement, int $field): string|false

Liefert den SQL-Datentypen des Feldes, das in der angegeben Ergebniskennung numerisch referenziert wird.

Parameter-Liste

statement

Das ODBC-Ergebnis-Objekt.

field

Die Feldnummer. Die Nummerierung beginnt mit 1.

Rückgabewerte

Gibt den Feldtyp als Zeichenkette zurück, oder false im Fehlerfall.

Changelog

Version Beschreibung
8.4.0 statement erwartet nun eine Instanz von Odbc\Result; vorher wurde eine Ressource erwartet.
add a note

User Contributed Notes 5 notes

up
1
jschwartz at the-infoshop dot com
16 years ago
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.
up
1
jazper at lycos dot de
23 years ago
Returntypes on Access2000COUNTER  -  AutoincrementVARCHAR  -  TextLONGCHAR  -  MemoINTEGER  -  NumberDATETIME  -  Date/TimeCURRENCY  -  CurrencyBIT  -  TRUE/FALSELONGBINARY  -  OLE-ObjectLONGCHAR  -  Hyperlinkcheers, j.a.z.
up
0
ted at convey dot de
9 years ago
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...
up
0
jorge dot emailNOSPAM at gmail dot com
18 years ago
Here is the complete list!Access 2003 as the following teturntypes:COUNTER  -  AutoincrementVARCHAR  -  TextLONGCHAR  -  MemoINTEGER  -  NumberDATETIME  -  Date/TimeCURRENCY  -  CurrencyBIT  -  TRUE/FALSELONGBINARY  -  OLE-ObjectLONGCHAR  -  HyperlinkDOUBLE - Double NumberBYTE - Byte Number
up
0
not[at]wgpower[dot]net
19 years ago
Some fields can be of the following type too : REAL
To Top