2017 © Pedro Peláez
 

library zsql

SQL generator loosely based on Zend_Db_Select

image

jbboehr/zsql

SQL generator loosely based on Zend_Db_Select

  • Tuesday, January 24, 2017
  • by jbboehr
  • Repository
  • 1 Watchers
  • 5 Stars
  • 3,376 Installations
  • PHP
  • 4 Dependents
  • 0 Suggesters
  • 1 Forks
  • 1 Open issues
  • 28 Versions
  • 0 % Grown

The README.md

zsql.php

Build Status HHVM Status Coverage Status Latest Stable Version License, (*1)

Lightweight MySQL adapter and SQL generator, (*2)

Install

Via Composer, (*3)

``` bash composer require jbboehr/zsql, (*4)



## Usage ### Delete ```php $database = new zsql\Adapter\MysqliAdapter($mysqli); $database->delete() ->from('tableName') ->where('columnName', 'value') ->limit(1) ->query();

Insert

$database = new zsql\Adapter\MysqliAdapter($mysqli);
$id = $database->insert()
  ->ignore()
  ->into('tableName')
  ->value('columnName', 'value')
  ->value('otherColumnName', 'otherValue')
  ->query();

Select

$database = new zsql\Adapter\MysqliAdapter($mysqli);
$rows = $database->select()
  ->from('tableName')
  ->where('columnName', 'value')
  ->order('orderColumn', 'ASC')
  ->limit(2)
  ->offset(5)
  ->query()
  ->fetchAll();

Update

$database = new zsql\Adapter\MysqliAdapter($mysqli);
$database->update()
  ->table('tableName')
  ->set('columnName', 'value')
  ->set('someColumn', new zsql\Expression('NOW()'))
  ->where('otherColumnName', 'otherValue')
  ->limit(1)
  ->query();

Basic SQL or Custom Database Adapter

See Adapters.md, (*5)

Testing

bash make test, (*6)

License

This project is licensed under the MIT license., (*7)

The Versions

24/01 2017

dev-master

9999999-dev http://github.com/jbboehr/zsql.php

SQL generator loosely based on Zend_Db_Select

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

sql generator mysql db

24/01 2017
01/12 2016

0.8.x-dev

0.8.9999999.9999999-dev http://github.com/jbboehr/zsql.php

SQL generator loosely based on Zend_Db_Select

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

sql generator mysql db

04/11 2016
04/11 2016
20/09 2016
10/09 2016
20/08 2016
12/04 2016

dev-feature/pdo

dev-feature/pdo http://github.com/jbboehr/zsql.php

SQL generator loosely based on Zend_Db_Select

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

sql generator mysql db

17/12 2015

dev-develop

dev-develop http://github.com/jbboehr/zsql.php

SQL generator loosely based on Zend_Db_Select

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

sql generator mysql db

08/12 2015

v0.4.0

0.4.0.0 http://github.com/jbboehr/zsql.php

SQL generator loosely based on Zend_Db_Select

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

sql generator mysql db

08/12 2015

0.4.x-dev

0.4.9999999.9999999-dev http://github.com/jbboehr/zsql.php

SQL generator loosely based on Zend_Db_Select

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

sql generator mysql db

07/07 2015

v0.3.10

0.3.10.0 http://github.com/jbboehr/zsql.php

SQL generator loosely based on Zend_Db_Select

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

sql generator mysql db

07/07 2015

dev-feature/query-logger

dev-feature/query-logger http://github.com/jbboehr/zsql.php

SQL generator loosely based on Zend_Db_Select

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

sql generator mysql db

10/03 2015

v0.3.9

0.3.9.0 http://github.com/jbboehr/zsql.php

SQL generator loosely based on Zend_Db_Select

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

sql generator mysql db

10/03 2015

v0.3.8

0.3.8.0 http://github.com/jbboehr/zsql.php

SQL generator loosely based on Zend_Db_Select

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

sql generator mysql db

07/10 2014

dev-scrutinizerci

dev-scrutinizerci http://github.com/jbboehr/zsql.php

SQL generator loosely based on Zend_Db_Select

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

sql generator mysql db

03/10 2014

0.3.7

0.3.7.0 http://github.com/jbboehr/zsql.php

SQL generator loosely based on Zend_Db_Select

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

sql generator mysql db

16/09 2014

0.3.6

0.3.6.0 http://github.com/jbboehr/zsql.php

SQL generator loosely based on Zend_Db_Select

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

sql generator mysql db

08/08 2014

0.3.5

0.3.5.0 http://github.com/jbboehr/zsql.php

SQL generator loosely based on Zend_Db_Select

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

sql generator mysql db

06/08 2014

0.3.4

0.3.4.0 http://github.com/jbboehr/zsql.php

SQL generator loosely based on Zend_Db_Select

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

sql generator mysql db

05/08 2014

0.3.3

0.3.3.0 http://github.com/jbboehr/zsql.php

SQL generator loosely based on Zend_Db_Select

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

sql generator mysql db

05/08 2014

0.3.2

0.3.2.0 http://github.com/jbboehr/zsql.php

SQL generator loosely based on Zend_Db_Select

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

sql generator mysql db

19/07 2014

0.1.1

0.1.1.0 http://github.com/jbboehr/zsql.php

SQL generator loosely based on Zend_Db_Select

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

sql generator mysql db

18/07 2014

0.3.1

0.3.1.0 http://github.com/jbboehr/zsql.php

SQL generator loosely based on Zend_Db_Select

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

sql generator mysql db

14/02 2014

0.3.0

0.3.0.0 http://github.com/jbboehr/zsql.php

SQL generator loosely based on Zend_Db_Select

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

sql generator mysql db

14/02 2014

0.2.0

0.2.0.0 http://github.com/jbboehr/zsql.php

SQL generator loosely based on Zend_Db_Select

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

sql generator mysql db

15/05 2013

0.1.0

0.1.0.0 http://github.com/jbboehr/zsql.php

SQL generator loosely based on Zend_Db_Select

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

sql generator mysql db