iporm/iporm
Composer 安装命令:
composer require iporm/iporm
包简介
Basic MySQL ORM package for PHP
README 文档
README
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.
There are plenty of excellent wrappers out there, but I hope you will have fun using this one.
##Installation
Simplest way to install it is via composer, package name is "iporm/iporm", so include it in your composer.json with:
composer require iporm/iprom
or you can download it here directly. After installation, please adjust connection parameters in Connection.php file.
##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.
###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());
统计信息
- 总下载量: 22
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2016-11-06