ADOdb

Database Abstraction Layer for PHP

User Tools

Site Tools


v5:dictionary:setactualtype

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Last revisionBoth sides next revision
v5:dictionary:setactualtype [2017/05/15 16:44] – [Description] typo dregadv5:dictionary:setactualtype [2017/05/15 16:46] – [Usage] adjust formatting, fix typo dregad
Line 22: Line 22:
 A connection to a data dictionary object is required, but a database connection is not. A connection to a data dictionary object is required, but a database connection is not.
 ===== Usage ==== ===== Usage ====
-In this example we want to change the behavior of the mssqlnative driver, so that instead of the default ''datetime'' type associated with the 'D' metatype, we want to use data dictionary functions to create a more portable 'date' type (available since SQL Server 2008).+In this example we want to change the behavior of the mssqlnative driver, so that instead of the default ''datetime'' type associated with the ''D'' metatype, we want to use data dictionary functions to create a more portable ''date'' type (available since SQL Server 2008).
 <code php> <code php>
 $db = newAdoConnection('mssqlnative'); $db = newAdoConnection('mssqlnative');
Line 29: Line 29:
 $dict->setActualType('D','DATE'); $dict->setActualType('D','DATE');
 </code> </code>
-In the second example, we will create a new actual types so that we can use the adodb dictionary function to create tables containing geospatial information.+In the second example, we will create a new actual types so that we can use the ADOdb dictionary function to create tables containing geospatial information.
  
 <code php> <code php>
-$db = newAdoConnection('mysql');+$db = newAdoConnection('mysqli');
 $dict = NewDataDictionary($db); $dict = NewDataDictionary($db);
  
Line 50: Line 50:
 Array Array
 ( (
- [0] => ALTER TABLE POSITION ADD GEODATA GEOMETERY+ [0] => ALTER TABLE POSITION ADD GEODATA GEOMETRY
  [1] => ALTER TABLE POSITION ADD POINTDATA POINT  [1] => ALTER TABLE POSITION ADD POINTDATA POINT
 ) )
v5/dictionary/setactualtype.txt · Last modified: 2017/07/22 18:39 by mnewnham