PHP Driver Examples

From Ingres Community Wiki

Jump to: navigation, search

The following code samples are extracted from the test suite used for testing the PECL Ingres extension.

Contents

Connections

PHP Demo Program Description
PHP - Connect to a database as current user Connect to a database as current user
PHP - Connect to a database with user+password Connect to a database with user+password
PHP - Connect to a database using a role Connect to a database using a role
PHP - Connect to a database using a role and role password Connect to a database using a role and role password
PHP - Connect to a database changing the effective user Connect to a database changing the effective user
PHP - Connect to a database using a group Connect to a database using a group
PHP - Connecting with a dbms password Connecting with a dbms password

Executing Queries

PHP Demo Program Description
PHP - Execute a simple select against default link - no results returned Execute a simple select against default link - no results returned
PHP - Execute a simple select against default link - fetch object Execute a simple select against default link - fetch object
PHP - Execute a simple select against default link - fetch row Execute a simple select against default link - fetch row
PHP - Execute a simple select against default link - fetch assoc array Execute a simple select against default link - fetch assoc array
PHP - Nested (Master Detail) query Nested (Master Detail) query
PHP - Connect to a database using a group Connect to a database using a group
PHP - Connecting with a dbms password Connecting with a dbms password

Executing Queries With Parameters

PHP Demo Program Description
PHP - Execute a simple select using a parameter - fetch object Execute a simple select using a parameter - fetch object
PHP - Execute an insert using a parameter Execute an insert using a parameter
PHP - Execute a delete using a parameter Execute a delete using a parameter
PHP - Execute an update using a parameter Execute an update using a parameter

Modifying The Default Table And Index Structures

PHP Demo Program Description
PHP - Specifying the default structure for a newly created table Specifying the default structure for a newly created table
PHP - Specifying the default structure for a new index Specifying the default structure for a new index

Adjusting The Timezone and Date Format

PHP Demo Program Description
PHP - Adjust the timezone to GMT and retrieve a date value Adjust the timezone to GMT and retrieve a date value
PHP - Adjust the timezone to NA-PACIFIC and retrieve a date value Adjust the timezone to NA-PACIFIC and retrieve a date value
PHP - Adjust the timezone to NA-EASTERN and retrieve a date value Adjust the timezone to NA-EASTERN and retrieve a date value
PHP - Adjust the timezone to UNITED-KINGDOM and retrieve a date value Adjust the timezone to UNITED-KINGDOM and retrieve a date value
PHP - Adjust the timezone to HONG-KONG and retrieve a date value Adjust the timezone to HONG-KONG and retrieve a date value
PHP - Adjust the timezone to GMT-5 and retrieve a date value Adjust the timezone to GMT-5 and retrieve a date value
PHP - Adjust the timezone to GMT3-AND-HALF and retrieve a date value Adjust the timezone to GMT3-AND-HALF and retrieve a date value
PHP - Adjust the date format to US and retrieve a date value Adjust the date format to US and retrieve a date value
PHP - Adjust the date format to US and retrieve a date value Adjust the date format to US and retrieve a date value
PHP - Adjust the date format to MULTINATIONAL and retrieve a date value Adjust the date format to MULTINATIONAL and retrieve a date value
PHP - Adjust the date format to MULTINATIONAL4 and retrieve a date value Adjust the date format to MULTINATIONAL4 and retrieve a date value
PHP - Adjust the date format to GERMAN and retrieve a date value Adjust the date format to GERMAN and retrieve a date value
PHP - Adjust the date format to ISO and retrieve a date value Adjust the date format to ISO and retrieve a date value
PHP - Adjust the date format to ISO4 and retrieve a date value Adjust the date format to ISO4 and retrieve a date value
PHP - Adjust the date format to FINNISH and retrieve a date value Adjust the date format to FINNISH and retrieve a date value
PHP - Adjust the date format to DMY and retrieve a date value Adjust the date format to DMY and retrieve a date value
PHP - Adjust the date format to YMD and retrieve a date value Adjust the date format to YMD and retrieve a date value
PHP - Adjust the date format to MDY and retrieve a date value Adjust the date format to MDY and retrieve a date value
PHP - Date century boundary Date century boundary

Adjusting The Money Format And Currency Position

PHP Demo Program Description
PHP - Setting money format on connection Setting money format on connection
PHP - Setting money format to € in the trailing position Setting money format to € in the trailing position

Unicode

PHP Demo Program Description
PHP - Selecting Unicode data using NCHAR parameters Selecting Unicode data using NCHAR parameters
PHP - Executing a row producing procedure using NCHAR parameters Executing a row producing procedure using NCHAR parameters

BLOBS

PHP Demo Program Description
PHP - Selecting a binary object Selecting a binary object
PHP - Inserting a binary object Inserting a binary object
Personal tools
Developing With