ADOdb

Database Abstraction Layer for PHP

User Tools

Site Tools


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";
 
$db = NewADOConnection('postgres');
// connection assumed
 
$m = $db->metaType('polygon');
print $m;
// Unknown, returns: 'C'
v5/reference/adodb_default_metatype.txt · Last modified: 2023/11/05 01:17 by dregad