v5:reference:adodb_default_metatype
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
v5:reference:adodb_default_metatype [2016/01/30 20:15] – created mnewnham | v5:reference:adodb_default_metatype [2023/11/05 01:17] (current) – [Usage] dregad | ||
---|---|---|---|
Line 4: | Line 4: | ||
The constant must be declared **before** including | The constant must be declared **before** including | ||
- | The constant '' | + | The constant '' |
This constant is useful for example in geometry data types where there is no defined metaType in ADOdb | This constant is useful for example in geometry data types where there is no defined metaType in ADOdb | ||
===== Usage ===== | ===== Usage ===== | ||
- | <code php> | ||
- | /* | ||
- | * Connecting to | ||
- | DEFINE(ADODB_ASSOC_CASE, | ||
- | require " | ||
- | |||
- | /* | ||
- | * connection assumed | ||
- | */ | ||
- | |||
- | $SQL = " | ||
- | $data = $db-> | ||
- | print_r($data); | ||
- | /* | ||
- | * Response is: | ||
- | | ||
- | ' | ||
- | ), | ||
- | | ||
- | ' | ||
- | ) | ||
- | ) | ||
- | |||
- | */ | ||
- | </ | ||
- | |||
- | or: | ||
- | <code php> | ||
- | DEFINE(ADODB_ASSOC_CASE, | ||
- | require " | ||
- | |||
- | /* | ||
- | * connection assumed | ||
- | */ | ||
- | |||
- | $SQL = " | ||
- | $data = $db-> | ||
- | print_r($data); | ||
- | /* | ||
- | * Response is: | ||
- | | ||
- | ' | ||
- | ), | ||
- | | ||
- | ' | ||
- | ) | ||
- | ) | ||
- | |||
- | */ | ||
- | </ | ||
- | |||
- | or: | ||
<code php> | <code php> | ||
- | DEFINE(ADODB_ASSOC_CASE,3); | + | // Connecting to a postgreSql database |
+ | DEFINE(ADODB_DEFAULT_METATYPE, ' | ||
require " | require " | ||
- | /* | + | $db = NewADOConnection(' |
- | | + | // connection assumed |
- | */ | + | |
- | $SQL = " | + | $m = $db->metaType(' |
- | $data = $db->getAll($SQL); | + | print $m; |
- | print_r($data); | + | // Unknown, returns: 'C' |
- | /* | + | |
- | * Response is: | + | |
- | | + | |
- | ' | + | |
- | ), | + | |
- | | + | |
- | ' | + | |
- | ) | + | |
- | ) | + | |
- | */ | ||
</ | </ |
v5/reference/adodb_default_metatype.1454181311.txt.gz · Last modified: 2017/04/21 11:32 (external edit)