danek/grimoire-db
Composer 安装命令:
composer require danek/grimoire-db
包简介
Grimoire is a PHP library for simple working with data in the database.
关键字:
README 文档
README
Grimoire is a PHP library for simple working with data in the database. The most interesting feature is a very easy work with table relationships. The overall performance is also very important and Grimoire can actually run faster than a native driver.
Contents
Requirements
- PHP 7.1+
- only MySQL database supported
Installation
composer require danek/grimoire-db
Usage
<?php $connection = new \Mysqli(...); $config = Grimoire\Config::build($connection); $software = new Grimoire\Database($config); foreach ($software->table('application')->order("title") as $application) { // get all applications ordered by title echo $application['title'] . "\n"; // print application title echo $application->ref('author')['name'] . "\n"; // print name of the application author foreach ($application->related('application_tag') as $application_tag) { // get all tags of $application echo $application_tag->ref('tag')['name'] . "\n"; // print the tag name } }
统计信息
- 总下载量: 29
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Apache-2.0
- 更新时间: 2023-08-13