ADOdb

Database Abstraction Layer for PHP

User Tools

Site Tools


Action unknown: siteexport_addpage
v5:reference:adodb_default_metatype

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.txt · Last modified: 2016/01/30 20:28 by mnewnham