Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jdanek/grimoire-db
PHP library using MySQLi driver for simple reading data from the database. Based on NotORM.
https://github.com/jdanek/grimoire-db
database mysql-database mysqli
Last synced: 28 days ago
JSON representation
PHP library using MySQLi driver for simple reading data from the database. Based on NotORM.
- Host: GitHub
- URL: https://github.com/jdanek/grimoire-db
- Owner: jDanek
- Created: 2023-08-11T05:57:44.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-09-04T20:34:12.000Z (2 months ago)
- Last Synced: 2024-09-28T15:42:18.858Z (about 1 month ago)
- Topics: database, mysql-database, mysqli
- Language: PHP
- Homepage:
- Size: 188 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
Awesome Lists containing this project
README
Grimoire
########.. image:: https://repository-images.githubusercontent.com/677257963/b1803baf-c64a-4975-98c9-9ea5f5425cfa
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 supportedInstallation
************.. code-block:: bash
composer require danek/grimoire-db
Usage
*****.. code:: php
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
}
}