Download the PHP package elie29/oci-driver without Composer
On this page you can find all versions of the php package elie29/oci-driver. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package oci-driver
OCI Driver
Documentation
Text file encoding
- UTF-8
Code style formatter
- PSR-2
Installation
Run the command below to install via Composer:
Getting Started
OCI Query Builder provides a lightweight builder to dynamically create SQL queries. It does not validate the query at all.
Select builder
Select builder with union
Delete builder
Update builder
Insert builder
More examples are found in tests/OCI/Query/Builder folder.
Using OCI Driver Class
Using the factory
Factory will automatically alter the session (@see OCI\Driver\Helper\SessionInit.php) in order to fix NLS_TIME_FORMAT and NLS_NUMERIC_CHARACTERS. So we won't need to use to_char or to_date to convert the format, especially in comparing dates with a given date:
Insert/Update Example
With Autocommit
Autocommit is the default behaviour of OCI Driver:
With Transaction
In order to start a transaction, you should use beginTransaction as follow:
N.B.: When an error occurred using a transaction, rollback is called automatically.
Bind parameters
Fetch one row
N.B.: For binding parameters, follow the same insertion example above.
Fetch many rows
N.B.: For binding parameters, follow the same insertion example above.
Prepare for test
Before launching unit tests, you should follow these steps:
Create A1 and A2 tables
In order to launch tests, A1 and A2 tables should be created as follow:
Rename config file
Rename config-connection.php.dist in ./tests/OCI/Helper to config-connection.php
Modify configuration
Modify USERNAME, PASSWORD and SCHEMA according to your Oracle Database Information
SCHEMA could be one of the following:
- SID name if you are executing the tests on the same database server or if you have a configured SID in tnsnames.ora
-
IP:PORT/SID eg: 11.22.33.25:12005/HR
- Use the following TNS :
(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=DATABASE_IP)(PORT=DATABASE_PORT))(CONNECT_DATA=(SID=DATABASE_SCHEMA)(SERVER=DEDICATED|POOLED)))
Development Prerequisites
Code style formatter
- Zend Framework coding standard
Composer commands
clean
: Cleans all generated filestest
: Launchesclean
and php unit testcover
: Launches unit test and a local servercs-check
: For code sniffer checkcs-fix
: For code sniffer fixcheck
: Launchescs-check
andtest
Ant commands
This project uses build.xml to perform static analysis and generate project documentation.
You should have apache-ant installed in order to launch ant
.
- Run
ant -p
to print out default and main targets.
All versions of oci-driver with dependencies
ext-oci8 Version *
ext-json Version *