====== metaType ====== ~~NOTOC~~ == Syntax == string metaType( mixed $dataType ) ===== Description ===== The function ''metaType()'' accepts as an argument a native, database-specific type. This is usually the result of a call to [[v5:reference:recordset:fetchfield|fetchField()]], and can be given either as a string, or an ADOFieldObject. It returns an [[v5:dictionary:dictionary_index#Summary_Of_Types|ADOdb standard datatype]], which provides a mapping to allow cross-database compatibility. ===== Usage ===== /* * Connection to mysql database */ print $db->metaType('VARCHAR'); // Returns 'C' /* * Using a Field Object from a recordset */ $rs = $db->execute('SELECT id FROM table'); $field = $rs->fetchField(0); print $rs->metaType($field->type); // Returns 'I' print $rs->metaType($field); // Returns 'I'