PHP samples

UNIX directory: sqllib/samples/php.

Windows directory: sqllib\samples\php.

Table 1. PHP sample program files
Type of sample Sample program name Program description
Database Level - Samples that deal with database objects in Db2®. DbAuthorities_DB2.php How to grant/display/revoke authorities at the database level.
DbAuthorities_PDO.php How to grant/display/revoke authorities at the database level.
Table Level - Samples that deal with table objects in Db2. TblIdentity_Columns_DB2.php How to use identity columns.
TblIdentity_Columns_PDO.php How to use identity columns.
TblSelect_PDO.php How to select from each of: insert, update, and delete.
TblSelect_DB2.php How to select from each of: insert, update, and delete.
TblConstraints_DB2.php How to work with table constraints.
TblConstraints_PDO.php How to work with table constraints.
TblTrigger_DB2.php How to use a trigger on a table.
TblTrigger_PDO.php How to use a trigger on a table.
TblUnion_DB2.php How to insert through a UNION ALL view.
TblUnion_PDO.php How to insert through a UNION ALL view.
Data Type Level - Samples that deal with data types. DtInfo_DB2.php How to get information about data types.
DtInfo_PDO.php How to get information about data types.
DtLOB_DB2.php How to read and write LOB data.
DtLOB_PDO.php How to read and write LOB data.
DtUDT_DB2.php How to create, use, and drop user-defined distinct types.
DtUDT_PDO.php How to create, use, and drop user-defined distinct types.
  XmlFlwor_DB2.php Use the XQuery FLWOR expression.
XmlIndex_DB2.php Create an index and use it in an XQuery.
XmlInsert_DB2.php Insert an XML document into a column of XML data type.
XmlRead_DB2.php Read XML data stored in tables.
XmlRelToXmlDOC_DB2.php Create XML document directly from data stored in relational tables using SQL/XML publishing functions.
XmlRelToXmlType_DB2.php Create an XML document from relational and XML data using SQL/XML publishing functions.
XmlRunstats_DB2.php Perform RUNSTATS on a table containing XML type columns..
XmlSchema_DB2.php Register the XML schema to the database and use the registered schema to validate and insert XML documents.
XmlSQLXQuery_DB2.php Use SQL/XML queries.
XmlUniqueIndexes_DB2.php Create an index with UNIQUE and VARCHAR length constraints.
XmlUpAndDel_DB2.php Update and delete XML documents in the tables.
XmlToTable_DB2.php Insert the data from an XML document into relational tables using SQL/XML.
XmlXPath_DB2.php Run simple XPath queries.
XmlXQuery_DB2.php Execute nested XQuery FLWOR expressions.
Common and Utility Files UtilConnection_DB2_Def A class definition for UtilConnection_DB2.php
UtilConnection_PDO_Def A class definition for UtilConnection_PDO.php
UtilIOHelper_Def A class definition for UtilIOHelper.php
PHPSampleConfig.cfg A configuration file that lets you set commonly used connection parameters that will be parsed by the IO_Helper class in util_IO_Helper.php for use in the samples. All information in here can be overridden when running the samples.
UtilConnection_DB2.php Handles General IBM_DB2 Connection for IBM_DB2 driver samples See UtilConnection_DB2_Def for Class definition details and overview.
UtilConnection_PDO.php Handles General PDO Connection for PDO driver samples See UtilConnection_PDO_Def for Class definition details and overview.
UtilIOHelper.php Handles General IO. See UtilIOHelper_Def for Class definition details and overview.
UtilTableSetup_Xml.php Sets up tables used in XML Samples.
UtilTableSetup_LOB.php Sets up tables used for the DtLOB samples
UtilTableSetup_Staff.php Sets up tables with in various samples