Giter Site home page Giter Site logo

zend_db-examples's Introduction

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();

zend_db-examples's People

Contributors

kschroeder avatar ralphschindler avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.