ADOdb Library for PHP Manual
Prev MetaType Next

MetaType($nativeDBType[,$field_max_length],[$fieldobj])

Determine what generic meta type a database field type is given its native type $nativeDBType as a string and the length of the field $field_max_length. Note that field_max_length can be -1 if it is not known. The field object returned by FetchField() can be passed in $fieldobj or as the 1st parameter $nativeDBType. This is useful for databases such as mysql which has additional properties in the field object such as primary_key.

Uses the field blobSize and compares it with $field_max_length to determine whether the character field is actually a blob.

For example, $db->MetaType('char') will return 'C'.
Returns:

Since ADOdb 3.0, MetaType accepts $fieldobj as the first parameter, instead of $nativeDBType.


Prev Home Next
FetchField Up Close

Sponsored by phpLens