2017 © Pedro Peláez
 

library styrofoam

A tiny pdo wrapper class

image

samayo/styrofoam

A tiny pdo wrapper class

  • Sunday, June 24, 2018
  • by samayo
  • Repository
  • 3 Watchers
  • 11 Stars
  • 11 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 8 Versions
  • 10 % Grown

The README.md

Styrofoam

A tiny PDO wrapper class, for simple CRUD operation., (*1)

Install

Using composer, (*2)

$ composer require samayo/styrofoam:1.0.*

Using git, (*3)

$ git clone https://github.com/samayo/styrofoam.git

Usage

require 'path/to/styrofoam.php';

$db = new Styrofoam\Database(
  'mysql:host=localhost; dbname=db-name;  charset=utf8', 'db-user', 'db-pass', [
  PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
  PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC 
]);

Examples

SELECT

// returns $select with value of query
$select = $db->select('SELECT * FROM users WHERE id = ?', [145]);

INSERT

// returns value lastInsertId() on success
$insert = $db->insert('INSERT INTO users (lastname) VALUES (?)', ['robin']);

DELETE

// returns $delete as boolean
$delete = $db->delete('DELETE FROM users WHERE id = ?', [456]);

UPDATE

// returns $update as boolean
$update = $db->update('UPDATE cars SET color = ? WHERE model = ?', ['blue', 'Toyota']);

The Versions

24/06 2018

dev-master

9999999-dev http://github.com/samayo/styrofoam

A tiny pdo wrapper class

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Avatar samayo

database crud wrapper pdo

07/02 2017

0.0.1

0.0.1.0 http://github.com/samayo/styrofoam

A tiny pdo wrapper class

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Avatar samayo

database crud wrapper pdo

07/02 2017

0.0.2

0.0.2.0 http://github.com/samayo/styrofoam

A tiny pdo wrapper class

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Avatar samayo

database crud wrapper pdo

07/02 2017

0.0.3

0.0.3.0 http://github.com/samayo/styrofoam

A tiny pdo wrapper class

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Avatar samayo

database crud wrapper pdo

07/02 2017

1.0.1

1.0.1.0 http://github.com/samayo/styrofoam

A tiny pdo wrapper class

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Avatar samayo

database crud wrapper pdo

07/02 2017

1.0.2

1.0.2.0 http://github.com/samayo/styrofoam

A tiny pdo wrapper class

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Avatar samayo

database crud wrapper pdo

07/06 2015

1.0.0

1.0.0.0 http://github.com/samayo/styrofoam

a tiny small pdo wrapper class

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Avatar samayo

orm wrapper pdo

07/06 2015

2.0.0

2.0.0.0 http://github.com/samayo/styrofoam

a tiny small pdo wrapper class

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Avatar samayo

orm wrapper pdo