ADOdb

Database Abstraction Layer for PHP

User Tools

Site Tools


v5:reference:adodb_default_metatype

This is an old revision of the document!


ADODB_DEFAULT_METATYPE

The constant must be declared before including adodb.inc.php. It is not possible to change the default metatype during a procedure.

The constant ADODB_DEFAULT_METATYPE controls the returned metatype of an unknown field type . The default value for this constant is 'N'.

This constant is useful for example in geometry data types where there is no defined metaType in ADOdb

Usage

/*
* Connecting to a postgreSql database
*/
DEFINE(ADODB_DEFAULT_METATYPE, 'C');
require "adodb/adodb.inc.php";
 
/*
 * connection assumed
*/
$db = new adoConnection('postgresql');
 
$m = $db->metaType('polygon');
print $m;
/*
* Unknown, returns: 'C'
*/
v5/reference/adodb_default_metatype.1454182093.txt.gz · Last modified: 2017/04/21 11:32 (external edit)