Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
PHP
branch: master
Failed to load latest commit information.
includes Added ibm-db2 initial scripts
setup Added ibm-db2 initial scripts
tmp Initial commit
.gitignore sqlite workings
README.md Updated README.md
bootstrap.dist.php Updated bootstrap
example-01.php Oracle additions
example-02.php Oracle additions
example-03.php Updated
example-04.php Updated
example-05.php Initial commit
example-06.php Fixed remaining examples to work with new dataset.
example-07.php Added postgres support and changes to examples
example-08.php Examples for insert(), update(), & delete() for TableGateway updated.
example-09.php Examples for insert(), update(), & delete() for TableGateway updated.
example-10.php Added postgres support and changes to examples
example-11.php Quick example of configuration through Di
example-12.php Added postgres support and changes to examples
example-13.php Script cleanup
example-14.php Fixed remaining examples to work with new dataset.
example-15.php Added postgres support and changes to examples
example-16.php Updated example, new double iteration (buffering) example
example-17.php Updated 17 and 16
example-18.php Added postgres support and changes to examples
example-19.php Added whiteboard script, also added some subselect scripts
example-20.php Added whiteboard script, also added some subselect scripts
example-21.php Updated example, new double iteration (buffering) example
example-22.php Example 22 updated
whiteboard.php Added ibm-db2 initial scripts

README.md

README

Introduction

This repository show's off Zend\Db's feature-set via a simple schema and simple tasks. The schema's are located in setup/vendor and are tailored to setup a scheme in a vendor specific way. So, the first thing you'll need to do is run the setup scripts. If you decide you want to run them against something other than Sqlite, first copy the bootstrap and setup the proper credentials.

Setup:

First, you'll need to

setup/up.php

If you want to run against something other than Sqlite, copy the bootstrap, then fill out the credentials in the appropriate section:

cp bootstrap.dist.php bootstrap.php
< < edit bootstrap.php > >

To destroy a schema

setup/down.php

Examples:

1 - 4. (working) SELECT, INSERT, UPDATE, DELETE through adapter using array based parameritized query. These scripts are utilizing the Adapter and Platform API's to produce vendor agnostic queries.

php example-01.php
php example-02.php
php example-03.php
php example-04.php

5. Demonstrate adapter exception handling (not working.)

n/a

6 - 9. TableGateway examples showing basic select(), insert(), update(), and delete().

php example-06.php
php example-07.php
php example-08.php
php example-09.php

Unpacking the Phar:

Currently, this master repository is using an up to date phar of just Zend_Db. To extract these files for usage, use the phar.phar utility:

phar.phar extract -f Zend_Db-2.0.0dev.phar

Linking to your checked out code:

cp bootstrap.dist.php bootstrap.php

edit bootstrap with:

// include 'Zend_Db-2.0.0dev.phar';
require_once '/path/to/ZF2/library/Zend/Loader/StandardAutoloader.php';
$autoloader = new Autoloader;
$autoloader->register();
Something went wrong with that request. Please try again.