2017 © Pedro Peláez
 

library database

Soneritics Database framework for PHP 5.5 and higher.

image

soneritics/database

Soneritics Database framework for PHP 5.5 and higher.

  • Monday, June 11, 2018
  • by soneritics
  • Repository
  • 1 Watchers
  • 0 Stars
  • 118 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 9 Versions
  • 5 % Grown

The README.md

Soneritics Database

Build Status Coverage Status License, (*1)

by * @Soneritics - Jordi Jolink, (*2)

Introduction

Soon.., (*3)

Minimum Requirements

  • PHP 5.5+
  • PDO driver for your respective database (atm only MySQL is supported)

Supported Databases

  • MySQL

Features

  • Much

Database querying

Database querying is very easy. A few examples can be found in the code below., (*4)

// Define the tables we have as Table extends
class Father extends Table {}
class Mother extends Table {}
class Child extends Table {}

// Use the Child table as a base for the queries
$child = new Child;

// Select everything from the children table
$child
    ->select()
    ->execute();

// Join a child with it's parents
$child
    ->select()
    ->leftJoin(new Father, 'Father.id = father_id')
    ->leftJoin(new Mother, 'Mother.id = mother_id')
    ->execute();

// A new child has been born!
$child
    ->insert()
    ->values([
        'firstname' => 'first name',
        'lastname' => 'last name',
        'father_id' => 1,
        'mother_id' => 1
    ])
    ->execute();

// Typo in the baby's name :-)
$child
    ->update()
    ->set('firstname', 'new first name')
    ->where([
        'firstname' => 'first name',
        'lastname' => 'last name'
    ])
    ->execute();

// Typo in the first and lastname of the baby :O
$child
    ->update()
    ->set(['firstname' => 'new first name', 'lastname' => 'new last name'])
    ->where([
        'firstname' => 'first name',
        'lastname' => 'last name'
    ])
    ->execute();

// Selecting with some sorting and limiting
$child
    ->select()
    ->leftJoin(new Father, 'Father.id = father_id')
    ->leftJoin(new Mother, 'Mother.id = mother_id')
    ->orderAsc('lastname')
    ->orderAsc('firstname')
    ->limit(25)
    ->execute();

The Versions

11/06 2018

dev-master

9999999-dev http://database.soneritics.nl/

Soneritics Database framework for PHP 5.5 and higher.

  Sources   Download

MIT

The Requires

  • php >=5.5.0

 

The Development Requires

11/06 2018

1.3.3

1.3.3.0 http://database.soneritics.nl/

Soneritics Database framework for PHP 5.5 and higher.

  Sources   Download

MIT

The Requires

  • php >=5.5.0

 

The Development Requires

11/06 2018

1.3.2

1.3.2.0 http://database.soneritics.nl/

Soneritics Database framework for PHP 5.5 and higher.

  Sources   Download

MIT

The Requires

  • php >=5.5.0

 

The Development Requires

10/10 2017

1.3.1

1.3.1.0 http://database.soneritics.nl/

Soneritics Database framework for PHP 5.5 and higher.

  Sources   Download

MIT

The Requires

  • php >=5.5.0

 

The Development Requires

10/10 2017

1.3.0

1.3.0.0 http://database.soneritics.nl/

Soneritics Database framework for PHP 5.5 and higher.

  Sources   Download

MIT

The Requires

  • php >=5.5.0

 

The Development Requires

01/10 2017

1.2.1

1.2.1.0 http://database.soneritics.nl/

Soneritics Database framework for PHP 5.5 and higher.

  Sources   Download

MIT

The Requires

  • php >=5.5.0

 

The Development Requires

27/07 2017

1.2

1.2.0.0 http://database.soneritics.nl/

Soneritics Database framework for PHP 5.5 and higher.

  Sources   Download

MIT

The Requires

  • php >=5.5.0

 

The Development Requires

02/06 2016

1.0.1

1.0.1.0 http://database.soneritics.nl/

Soneritics Database framework for PHP 5.5 and higher.

  Sources   Download

MIT

The Requires

  • php >=5.5.0

 

The Development Requires

15/10 2015

1.0.0

1.0.0.0 http://database.soneritics.nl/

Soneritics Database framework for PHP 5.5 and higher.

  Sources   Download

MIT

The Requires

  • php >=5.5.0

 

The Development Requires