2017 © Pedro Peláez
 

library database

Database Abstraction Layer

image

avryhof/database

Database Abstraction Layer

  • Friday, April 20, 2018
  • by avryhof
  • Repository
  • 1 Watchers
  • 0 Stars
  • 166 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Database

A Simple Database abstraction layer., (*1)

Normalization

This library is designed mostly to normailze the usage of the included databases., (*2)

Object Oriented

Enables some non object-oriented databse functions to be accessed and used in an object-oriented way., (*3)

K.I.S.S.

This layer is designed so you don't need to learn a whole new way of working with databases. It is designed to work as closely to the built-in PHP functionality as possible, while making it possible to port your application from any of the supported databses to another without changing a bunch of code., (*4)

Example

  require_once("database.php");

  $db = new Database("mysql://user:pass@localhost/database");

  or

  $db = new Database("sqlite:///home/user/data/users.db?mode=0666");

  /* The Code Below works the same on all supported databases! */

  $db->insert("users", array("name" => "User", "password" => "{password}", "email" => "someone@example.com"));

  $users = $db->query("SELECT * FROM users WHERE name = 'User'");

  if ($users->num_rows > 0) {
    while($user = $users->fetch_assoc()) {
      echo "

" . print_r($user,true) . "
"; } } $db->update("users", array("name" => "Bob"),"name = 'User'"); $db->delete("users", "name = 'Bob'");

The Versions

20/04 2018

dev-pdo

dev-pdo https://github.com/avryhof/database

Database Abstraction Layer

  Sources   Download

MIT

The Requires

  • php >=5.0.0

 

by Amos Vryhof

database mysql sqlite

25/02 2016

dev-master

9999999-dev https://github.com/avryhof/database

Database Abstraction Layer

  Sources   Download

MIT

The Requires

  • php >=5.0.0

 

by Amos Vryhof

database mysql sqlite

25/02 2016

v1.0.0

1.0.0.0 https://github.com/avryhof/database

Database Abstraction Layer

  Sources   Download

MIT

The Requires

  • php >=5.0.0

 

by Amos Vryhof

database mysql sqlite