/component_database

Some class and tools for database usage: Pdo functions, Pagination, Table Configuration...

Primary LanguagePHPGNU General Public License v3.0GPL-3.0

Component Database

Some class and tools for database usage: Pdo functions, Pagination, Table Configuration...

  • Navigation Page: Page pagination with mysql or sqlite.
  • Pdo Utils: Some utils method with PDO (connexion, insert, update, etc).
  • Pdo Table Configuration: Management of a configuration table, inspired by the wp_options table (wordpress).
  • Pdo Alice: Generation of fixtures in the database from YAML file (alice) with PDO for PHP Legacy.

Prerequisite

  • PHP 8.2 (v2.1) or old version: 7.4 (v2), 5.6+ (v1.4+), 5.5 (v1.3), 5.4 (v1.2), 5.3 (v1.1), 4 (v1.0)
  • Pdo Mysql, Sqlite 3
  • (optional) Alice fixtures

Install

Edit your composer.json (launch composer update after edit):

{
  "repositories": [
    { "type": "git", "url": "git@github.com:jgauthi/component_database.git" }
  ],
  "require": {
    "jgauthi/component_database": "2.*"
  }
}

Documentation

You can look at folder example.