2017 © Pedro Peláez
 

library iporm

Basic MySQL ORM package for PHP

image

iporm/iporm

Basic MySQL ORM package for PHP

  • Monday, June 19, 2017
  • by pejicbgd
  • Repository
  • 1 Watchers
  • 0 Stars
  • 13 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

About

Iporm is a basic ORM package written in PHP. Usage is very simple, it is based on method chaining pattern, so it feels natural and fluent. This is a extension of a simple wrapper that I wrote a long time ago, which expanded and matured over time., (*1)

There are plenty of excellent wrappers out there, but I hope you will have fun using this one., (*2)

Installation

Simplest way to install it is via composer, package name is "iporm/iporm", so include it in your composer.json with:, (*3)

composer require iporm/iprom

or you can download it here directly. After installation, please adjust connection parameters in Connection.php file., (*4)

Guidelines

Below you will fing usage examples for some of the main methods. For a complete reference and functional code examples check out index.php., (*5)

Select statement

$db = new Iprom\Db();
$db->select()
    ->from('users')
    ->run();

print_r($db->getSelected());

Insert statement

$db = new Iporm\Db();
$db->insertInto('users', ['name' => 'Sample', 'last_name' => 'Name'])
    ->run();

print_r($db->getInsertedId());

Update statement

$db = new Iporm\Db();
$db->update('users', ['name' => 'New'])
    ->where(['name' => 'Sample'])
    ->run();

print_r($db->getAffected());

Delete statement

$db = new Iporm\Db();
$db->delete()
    ->from('users')
    ->where(['name' => 'New'])
    ->run();

print_r($db->getAffected());

The Versions

19/06 2017

dev-master

9999999-dev https://github.com/pejicbgd/iporm

Basic MySQL ORM package for PHP

  Sources   Download

The Requires

  • php >=5.3.0

 

by Ivan Pejic

19/06 2017

1.1.0

1.1.0.0 https://github.com/pejicbgd/iporm

Basic MySQL ORM package for PHP

  Sources   Download

The Requires

  • php >=5.3.0

 

by Ivan Pejic

13/11 2016

v1.0.1

1.0.1.0 https://github.com/pejicbgd/iporm

Basic MySQL ORM package for PHP

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Ivan Pejic

orm php wrapper mysql