Just another PDO database library

Overview

PDO

Latest Stable Version Total Downloads Latest Unstable Version License

Just another PDO database library

Installation

Use Composer

$ composer require faapz/pdo 

Usage

Examples selecting, inserting, updating and deleting data from or into users table.

"your_new_password"]) ->table("users") ->where(new FaaPz\PDO\Clause\Conditional("id", "=", 1234)); if (($result = $insert->execute()) !== false) { $affectedRows = $result->rowCount(); } // DELETE FROM users WHERE id = ? $delete = $database->delete() ->from("users") ->where(new FaaPz\PDO\Clause\Conditional("id", "=", 1234)); if (($result = $delete->execute()) !== false) { $affectedRows = $result->rowCount(); }">
require_once 'vendor/autoload.php';

$dsn = 'mysql:host=your_db_host;dbname=your_db_name;charset=utf8';
$usr = 'your_db_username';
$pwd = 'your_db_password';

$database = new FaaPz\PDO\Database($dsn, $usr, $pwd);

// SELECT * FROM users WHERE id = ?
$select = $database->select()
                   ->from('users')
                   ->where(new FaaPz\PDO\Clause\Conditional('id', '=', 1234));

if ($insert->execute()) {
    $data = $stmt->fetch();
}

// INSERT INTO users (id , username , password) VALUES (? , ? , ?)
$insert = $database->insert(
                       'id',
                       'username',
                       'password'
                   )
                   ->into('users')
                   ->values(
                       1234,
                       'user',
                       'passwd'
                   );

if ($insert->execute()) {
    $insertId = $database->lastInsertId();
}

// UPDATE users SET pwd = ? WHERE id = ?
$update = $database->update(["pwd" => "your_new_password"])
                   ->table("users")
                   ->where(new FaaPz\PDO\Clause\Conditional("id", "=", 1234));

if (($result = $insert->execute()) !== false) {
    $affectedRows = $result->rowCount();
}

// DELETE FROM users WHERE id = ?
$delete = $database->delete()
                   ->from("users")
                   ->where(new FaaPz\PDO\Clause\Conditional("id", "=", 1234));

if (($result = $delete->execute()) !== false) {
    $affectedRows = $result->rowCount();
}

The sqlsrv extension will fail to connect when using error mode PDO::ERRMODE_EXCEPTION (default). To connect, you will need to explicitly pass array(PDO::ATTR_ERRMODE => PDO::ERRMODE_WARNING) (or PDO::ERRMODE_SILENT) into the constructor, or override the getDefaultOptions() method when using sqlsrv.

Documentation

See DOCUMENTATION

Changelog

See CHANGELOG

License

See LICENSE

Comments
  • Uncaught TypeError: Argument 1 passed to FaaPz\PDO\DatabaseException::__construct() must be of the type string, null given

    Uncaught TypeError: Argument 1 passed to FaaPz\PDO\DatabaseException::__construct() must be of the type string, null given

    php -S 0.0.0.0:8080 -t public [Wed Oct 28 22:23:19 2020] PHP 7.4.11 Development Server (http://0.0.0.0:8080) started [Wed Oct 28 22:23:22 2020] 127.0.0.1:60524 Accepted [Wed Oct 28 22:23:22 2020] PHP Fatal error: Uncaught TypeError: Argument 1 passed to FaaPz\PDO\DatabaseException::__construct() must be of the type string, null given, called in /Users/nixon/PhpstormProjects/my-blog/vendor/faapz/pdo/src/AbstractStatement.php on line 40 and defined in /Users/nixon/PhpstormProjects/my-blog/vendor/faapz/pdo/src/DatabaseException.php:23 Stack trace: #0 /Users/nixon/PhpstormProjects/my-blog/vendor/faapz/pdo/src/AbstractStatement.php(40): FaaPz\PDO\DatabaseException->__construct(NULL, 'HY093') #1 /Users/nixon/PhpstormProjects/my-blog/vendor/faapz/pdo/src/Statement/Update.php(155): FaaPz\PDO\AbstractStatement->execute() #2 /Users/nixon/PhpstormProjects/my-blog/app/Models/User.php(73): FaaPz\PDO\Statement\Update->execute() #3 /Users/nixon/PhpstormProjects/my-blog/app/Services/Auth.php(94): App\Models\User->update('id', 6, Array) #4 /Users/nixon/PhpstormProjects/my-blog/src/dependencies.php(33): App\Services\Auth->user() #5 [internal function]: {closure}(Object(DI\Container)) #6 /Users/nixon/PhpstormProjects/celco in /Users/nixon/PhpstormProjects/my-blog/vendor/faapz/pdo/src/DatabaseException.php on line 23 [Wed Oct 28 22:23:22 2020] 127.0.0.1:60524 [200]: GET /partners - Uncaught TypeError: Argument 1 passed to FaaPz\PDO\DatabaseException::__construct() must be of the type string, null given, called in /Users/nixon/PhpstormProjects/my-blog/vendor/faapz/pdo/src/AbstractStatement.php on line 40 and defined in /Users/nixon/PhpstormProjects/my-blog/vendor/faapz/pdo/src/DatabaseException.php:23 Stack trace: #0 /Users/nixon/PhpstormProjects/my-blog/vendor/faapz/pdo/src/AbstractStatement.php(40): FaaPz\PDO\DatabaseException->__construct(NULL, 'HY093') #1 /Users/nixon/PhpstormProjects/my-blog/vendor/faapz/pdo/src/Statement/Update.php(155): FaaPz\PDO\AbstractStatement->execute() #2 /Users/nixon/PhpstormProjects/my-blog/app/Models/User.php(73): FaaPz\PDO\Statement\Update->execute() #3 /Users/nixon/PhpstormProjects/my-blog/app/Services/Auth.php(94): App\Models\User->update('id', 6, Array) #4 /Users/nixon/PhpstormProjects/my-blog/src/dependencies.php(33): App\Services\Auth->user() #5 [internal function]: {closure}(Object(DI\Container)) #6 /Users/nixon/PhpstormProjects/celco in /Users/nixon/PhpstormProjects/my-blog/vendor/faapz/pdo/src/DatabaseException.php on line 23 [Wed Oct 28 22:23:22 2020] 127.0.0.1:60524 Closing [Wed Oct 28 22:25:00 2020] 127.0.0.1:60542 Accepted [Wed Oct 28 22:25:00 2020] 127.0.0.1:60542 [200]: GET /partners [Wed Oct 28 22:25:00 2020] 127.0.0.1:60542 Closing

    Please help with the error above

    bug vcs 
    opened by nixoncode 15
  • Help needed on insert statement

    Help needed on insert statement

    I followed the guide here https://github.com/FaaPz/PDO/blob/2.x/docs/Statement/Insert.md to make an insert page. $user_insert = new Insert($dsn, $user_attributes)->into('users');

    but I get error Parse error: syntax error, unexpected token "->" in app\includes\functions\auth.php on line 57

    I dont know if I have missed anything, but please help me.

    Thank you for your help!

    bug documentation 
    opened by christogonus 14
  • V2 Road Map

    V2 Road Map

    V2 Road Map

    • [x] Interfaces for all classes
    • [x] No more private variables and functions, only protected
    • [x] Correct use of getters & setters
    • [x] Support for strings ('one, two'), arrays ([$one, $two]) and ... parameters
    • [x] Nested queries
    • [x] Field aliases AS in SELECT clauses
    • [ ] ON DUPLICATE KEY UPDATE (#32)
    • [ ] Detect database driver (could be useful for e.g. #29)
    • [x] Required PHP version to 7.2
    • [x] Rename on Packagist
    • [x] Unit Tests

    If anyone has any suggestions, let me know! :pray:

    opened by FaaPz 13
  • v2-dev Refactoring Proposal

    v2-dev Refactoring Proposal

    Refactoring version 1.0 to be more Object Oriented in order to expand into other SQL domains. Created a top level interface for all statement types and move a few components around. Removed many convenience methods primarily to simplify the transition. No effort has been made to add support beyond MySql at this point.

    enhancement 
    opened by kwhat 12
  • Support for multiple grouping of 'OR' and 'AND' where clauses

    Support for multiple grouping of 'OR' and 'AND' where clauses

    I need to be able to build queries such as: SELECT * FROM tablename WHERE a = 1 AND (b=2 OR c=3)

    This should be the case when I write: $db->select()->from('tablename')->where('a', '=', 1)->where('b', '=', 2)->orWhere('c', '=', 3)

    But this does not provide any bracket grouping. Whenever a where clause is followed by an orWhere, how can we indicate grouping of or's?

    Cheers.

    enhancement 
    opened by shaq147 9
  • Update Testing Process

    Update Testing Process

    @FaaPz,

    Hope you are doing well. I am almost done adding unit tests to the master branch. I was wondering what service provides pull-request checks and if it would be possible to run composer test as part of that process? If not, maybe Circle CI?

    $ composer test
    > phpunit --coverage-html build/coverage tests/
    PHPUnit 8.2.5 by Sebastian Bergmann and contributors.
    
    .................................SS......SSS.....SSS.....S        58 / 58 (100%)
    
    Time: 908 ms, Memory: 8.00 MB
    
    OK, but incomplete, skipped, or risky tests!
    Tests: 58, Assertions: 67, Skipped: 9.
    

    image

    enhancement question 
    opened by kwhat 7
  • Use MySQL function and column as conditional value

    Use MySQL function and column as conditional value

    Hello,

    I tried to use the clause grouping as mentioned in the doc PDO/docs/Clause/CONDITIONAL.md:

     // ... WHERE col_1 = ? AND (col_2 = ? OR col_3 = ?)
     $statement->where(
         new Clause\Grouping("AND", array(
             new Clause\Conditional("col_1", "=", "val_1"),
             new Clause\Grouping("OR", array(
                 new Clause\Conditional("col_2", "=", 'val_2'),
                 new Clause\Conditional("col_3", "=", 'val_2')
             )
         ));
    

    Here's my code:

     $prizesStmt = $db->select(['id', 'value', 'text', 'isLosing', '_maxWinner', '_maxWinnerPerPeriod', '_maxWinnerPeriod', '_minDate', '_maxDate', 'totalWon'])
                 ->from('game_prize_types')
                 ->where(
                     new Grouping("AND",
                     [
                         new Grouping("OR",
                             new Conditional("totalWon", ">", "_maxWinner"),
                             new Conditional("_maxWinner", "IS", "NULL")
                         ),
                         new Grouping("OR",
                             new Conditional("_minDate", "<=", "NOW()"),
                             new Conditional("_minDate", "IS", "NULL")
                         ),
                         new Grouping("OR",
                             new Conditional("_maxDate", ">=", "NOW()"),
                             new Conditional("_maxDate", "IS", "NULL")
                         ),
                     ])
                 );
    

    But I have an error Uncaught PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '?) AND (_minDate <= ? OR _minDate IS ?) AND (_maxDate >= ? OR _maxDate IS ?)' at line 1. Should I specify with a parameter that the value is a SQL function or a column name ?

    Same for an update, I would like to increment column value but it doesn't work..

    Thanks in advance,

    opened by copostic 6
  • Can we use multiple insert statement in FaaPz / PDO

    Can we use multiple insert statement in FaaPz / PDO

    INSERT INTO employee(eid, ename, email, ebirthdate) VALUES (null,'test','test1@**.com',1530101800), (null,'test','test@*.com',1530101800)

    Can we create statement in slim pdo for multiple insert in one single query

    enhancement vcs 
    opened by ParthWeb 6
  • Escape column names

    Escape column names

    Hi there,

    When it compiles the query it doesn't escape column names in where section.

    Ex,

    $stmt = $pdo
        ->select()
        ->from('region')
        ->where('default', '=', true)
        ->execute()
    

    To fix I have to prefix the column names,

    $stmt = $pdo
        ->select()
        ->from('region')
        ->where('region.default', '=', true)
        ->execute()
    

    Guess, it would be nice if it could output something like

    SELECT * FROM `region` WHERE `default` = 1
    

    Cheers, Evgenii

    enhancement invalid 
    opened by nasyrov 6
  • Should this composer package be named as

    Should this composer package be named as "slim/pdo"?

    To avoid confusion, I think it's best to rename this to a different name (faapz/slim-pdo?) Devs may think that this is an official package maintained by Slim.

    Any thoughts?

    question 
    opened by jordikroon 6
  • insert update on duplicate key support.

    insert update on duplicate key support.

    I've implemented a quick support for inserting on duplicate key update for those interested.

    Use case:

    $db->insert( array('id', 'field1', 'field2', 'field3') )
        ->into('table')
        ->values('1', 'value1', 'value2', 'value3')
        ->updateOnDuplicate( array('field2' => 'value2', 'field3' => 'value3') );
    

    PDO/Statement/InsertStatement.php added 2 functions, 3 private variables, and updated the __toString method

    private $_updateOnDuplicate = false;
    private $_updateValues = array();
    private $_updateFields = array();
    
    public function updateOnDuplicate($fieldsValues)
    {
    	$fieldValues = (array) $fieldValues;
    
    	if(!empty($fieldValues) ) {
    		$this->_updateOnDuplicate = true;
    	        $this->_updateValues = array_values($fieldValues);
    	        $this->_updateFields = array_keys($fieldValues);
            }	
            return $this;
    }
    
    protected function _prepareUpdateFields()
    {
    	$this->setValues($this->_updateValues);
    
    	$str = '';
    	$commaFlag = false;
    	foreach($this->_updateFields as $field) {
    		if($commaFlag) $str .= ', ';
    		$str .= $field . ' = ?';
    		$commaFlag = true;
    	}
    	
    	return $str;
    }
    
    //Updated
    public function __toString()
    {
    	if (empty($this->table)) {
    		trigger_error('No table is set for insertion', E_USER_ERROR);
    	}
    
    	if (empty($this->columns)) {
    		trigger_error('Missing columns for insertion', E_USER_ERROR);
    	}
    
    	if (empty($this->values)) {
    		trigger_error('Missing values for insertion', E_USER_ERROR);
    	}
    
    	$sql = 'INSERT INTO '.$this->table;
    	$sql .= ' '.$this->getColumns();
    	$sql .= ' VALUES '.$this->getPlaceholders();
    	
    	if($this->_updateOnDuplicate) {
    		$sql .= ' ON DUPLICATE KEY UPDATE '.$this->_prepareUpdateFields();
    	}
    
    	return $sql;
    }
    
    
    
    enhancement vcs 
    opened by shaq147 5
  • Between condition with parentheses lead to strange state

    Between condition with parentheses lead to strange state

    Hi,

    When I write something like that :

            $db
                ->select()
                ->columns(['col1' => 'C1', 'col2' => 'C2'])
                ->from('table')
                ->where(new Grouping('AND', ...[
                    new Conditional('C2', 'BETWEEN', ['2022-01-01', '2022-12-31']),
                    new Conditional('C1', '=', 'OK'),
                ]));
    

    the "between" clause is writing like that :

    C2 BETWEEN ('2022-01-01' AND '2022-12-31') AND C1 = 'OK'
    

    It's not working like expected because : https://dba.stackexchange.com/a/251542

    (And I cannot passing array like second argument in Grouping, php raise an Exception. The doc seem to say "it's okay with an array")

    For informations, i use php 7.2 and mariadb 10.3.

    Thanks !

    bug 
    opened by serge-kilimoff 1
  • add parenthesis in query

    add parenthesis in query

    Sametimes we need to write a query with parenthesis like this exemple :

    WHERE ( categorie = 'informatique' AND stock < 20 )
    OR ( categorie = 'fourniture' AND stock < 200 )
    

    So with this merge we will be able to write it like this :

    $subject1 = new Parenthesis(new Conditional('categorie', '=', 'informatique'), 'AND', new Conditional('stock', '<', 20));
    $subject2 = new Parenthesis(new Conditional('categorie', '=', 'fourniture'), 'AND', new Conditional('stock', '<', 200));
    $subject  = new Conditional($subject1, 'OR', $subject2);
    
    opened by kernel64 2
  • Limit is treated as a string

    Limit is treated as a string

    As the statement is executed as $stmt->execute($this->getValues()), any integers will be added to the parameters as strings. This results in an SQL-error for LIMIT, as this needs to be an integer.

    SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''999'' at line 1
    
    bug 
    opened by jerome2710 7
  • Update about text

    Update about text "Just another PDO database library"

    Hey @FaaPz,

    I am just thinking of ways to improve SEO for this project and I think updating "Just another PDO database library" to something like "A object-oriented PDO based query builder for modern PHP" could help a lot. I am not 100% on that about phrase yet, still kicking around ideas but we should include query builder, PDO and PHP.

    We should probably also adjust the "topics" keywords as well. Maybe add the following:

    • MySQL
    • SQL
    • Database
    • PDO
    • PHP7 (Remove PHP72)
    opened by kwhat 1
Releases(v2.2.1)
  • v2.2.0(Nov 6, 2021)

  • v2.1.0(Oct 29, 2020)

  • v2.0.1(Jan 22, 2020)

  • v2.0.0(Dec 5, 2019)

    Release version 2.0.0

    Version 2.0 is a complete rewrite of the 1.x branch to address some of the querying shortfalls and to add PHP 7 support.

    Source code(tar.gz)
    Source code(zip)
  • v1.12.0(Sep 20, 2019)

  • v1.11.0(Mar 6, 2019)

    Release version 1.11.0

    • Rename package namespace in favor of Slim Framework (#20)
    • Updated StatementContainer class with:
      • Fixed getPlaceholders() method (#92)
    Source code(tar.gz)
    Source code(zip)
  • v1.10.1(Aug 15, 2017)

    Release version 1.10.1

    • Updated Database class with:
      • Allow user provided PDO options to overwrite default values
    • Updated StatementContainer class with:
      • Added check to stop executing when field value is not expected
    • Updated LimitClause class with:
      • Fixed LIMIT/OFFSET format
      • Changed default offset value
      • Added check whether offset is null (before checking if is integer)
    Source code(tar.gz)
    Source code(zip)
  • v1.10.0(Aug 14, 2016)

    Release version 1.10.0

    • Updated StatementContainer class with:
      • Added transactional commit() method
      • Added transactional rollBack() method
      • Added transactional beginTransaction() method
    • Updated LimitClause class with:
      • Added validation to check if parameters are casted to expected integers
    • Updated OffsetClause class with:
      • Added validation to check if parameter is casted to expected integer
    Source code(tar.gz)
    Source code(zip)
  • v1.9.9(May 29, 2016)

    Release version 1.9.9

    • Added ability to insert associative arrays (#35)
    • Updated Database class with:
      • Renamed $columns argument in insert() method
    • Updated StatementContainer class with:
      • Added isAssociative() method
      • Fixed getPlaceholders() method

    Proposed by Raistlfiren. Thanks!

    Source code(tar.gz)
    Source code(zip)
  • v1.9.8(Feb 27, 2016)

    Release version 1.9.8

    • Updated SelectStatement class with:
      • Fixed getColumns() method
    • Updated WhereClause class with:
      • Reverted __toString() method
    • Updated HavingClause class with:
      • Reverted __toString() method
    Source code(tar.gz)
    Source code(zip)
  • v1.9.7(Feb 27, 2016)

    Release version 1.9.7

    • Updated WhereClause class with:
      • Fixed some weird bug in __toString() method
    • Updated HavingClause class with:
      • Fixed the same weird bug in__toString() method

    Mentioned by EliaRigo. Thanks!

    Source code(tar.gz)
    Source code(zip)
  • v1.9.6(Feb 3, 2016)

  • v1.9.5(Jan 22, 2016)

  • v1.9.4(Jan 20, 2016)

  • v1.9.3(Jan 12, 2016)

  • v1.9.2(Dec 28, 2015)

  • v1.9.1(Dec 2, 2015)

  • v1.9.0(Nov 30, 2015)

  • v1.8.2(Nov 22, 2015)

    Release version 1.8.2

    • Updated Database class with:
      • Minor change __construct() method
      • Minor change insert() method
      • Minor change update() method
    • Updated LimitClause class with:
      • Minor change __toString() method
    • Updated OffsetClause class with:
      • Minor change __toString() method
    Source code(tar.gz)
    Source code(zip)
  • v1.8.1(Oct 7, 2015)

  • v1.8.0(Sep 14, 2015)

    Release version 1.8.0

    • PSR-2 coding style guide adopted
    • Updated InsertStatement class with:
      • Added columns() method
    • Updated UpdateStatement class with:
      • Added set() method
    • Updated StatementContainer class with:
      • Added $table argument in delete() method
    • Updated WhereClause class with:
      • Fixed orWhereLike()
    Source code(tar.gz)
    Source code(zip)
  • v1.7.2(Aug 8, 2015)

  • v1.7.1(Aug 7, 2015)

  • v1.7.0(Jul 25, 2015)

Owner
Fabian de Laender
Fabian de Laender
SQL database access through PDO.

Aura.Sql Provides an extension to the native PDO along with a profiler and connection locator. Because ExtendedPdo is an extension of the native PDO,

Aura for PHP 533 Dec 30, 2022
Easy data transfer from one database to another

Migrate DB Easy data transfer from one database to another Installation To get the latest version of Migrate DB, simply require the project using Comp

The Dragon Code 130 Dec 7, 2022
Simple MySQL library for PHP 5.4+ includes Query Builder, PDO Native functions, Helper functions for quick use.

Simple MySQL library for PHP 5.4+ includes Query Builder, PDO Native functions, Helper functions for quick use.

Kodols 9 Dec 22, 2022
Easy-to-use PDO wrapper for PHP projects.

EasyDB - Simple Database Abstraction Layer PDO lacks brevity and simplicity; EasyDB makes separating data from instructions easy (and aesthetically pl

Paragon Initiative Enterprises 705 Dec 9, 2022
You can sync any number of PDO supported databases

Features: Can backup any number of databases. No need to introduce column name only table name The Last id based data backup Support 12 different data

Tharusha Kavishan Udumulla 4 Aug 27, 2021
Tiny php mysql lib (PDO-based) with handy fetch/update functionality, supports both SQL and parametric queries

Micro PHP mysql lib (~ 200 lines of code) with ultra powerful CRUD for faster than ever development: parametric fetch/insert/update/delete (based on a

Mr Crypster 18 Dec 10, 2022
API abstracting communication with SQL providers (eg: MySQL) on top of PDO inspired by Java JDBC

SQL Data Access API Table of contents: About Configuration Execution Installation Unit Tests Examples Reference Guide About This API is a ultra light

Lucian Gabriel Popescu 0 Jan 9, 2022
Pure PHP NoSQL database with no dependency. Flat file, JSON based document database.

Please give it a Star if you like the project ?? ❤️ SleekDB - A NoSQL Database made using PHP Full documentation: https://sleekdb.github.io/ SleekDB i

Kazi Mehedi Hasan 745 Jan 7, 2023
SleekwareDB is a NoSQL database storage service. A database storage service that can be used for various platforms and is easy to integrate.

SleekwareDB is a NoSQL database storage service. A database storage service that can be used for various platforms and is easy to integrate. NoSQL API

SleekwareDB 12 Dec 11, 2022
A drop-in library for certain database functionality in Laravel, that allows for extra features that may never make it into the main project.

Eloquence Eloquence is a package to extend Laravel's base Eloquent models and functionality. It provides a number of utilities and classes to work wit

Kirk Bushell 470 Dec 8, 2022
A simple library to access and manipulate database records. Built on top of Dibi and hardwired for PostgreSQL.

grifart/tables A simple library to access and manipulate database records. Built on top of Dibi and hardwired for PostgreSQL. This library is develope

GRIFART 5 Nov 11, 2022
A simple library for managing database connections, results pagination and building queries in PHP

PHP lions-software-database-manager This is a simple library for managing database connections, results pagination and building queries in PHP. Esta é

Lions Software 0 Feb 7, 2022
The Enobrev\ORM library is a small framework of classes meant to be used for simply mapping a mysql database to PHP classes, and for creating simply SQL statements using those classes.

The Enobrev\ORM library is a small framework of classes meant to be used for simply mapping a mysql database to PHP classes, and for creating simply SQL statements using those classes.

Mark Armendariz 0 Jan 7, 2022
The lightweight PHP database framework to accelerate development

The lightweight PHP database framework to accelerate development Features Lightweight - Less than 100 KB, portable with only one file Easy - Extremely

Angel Lai 4.6k Dec 28, 2022
[READ ONLY] Subtree split of the Illuminate Database component (see laravel/framework)

Illuminate Database The Illuminate Database component is a full database toolkit for PHP, providing an expressive query builder, ActiveRecord style OR

The Laravel Components 2.5k Dec 27, 2022
ORM layer that creates models, config and database on the fly

RedBeanPHP 5 RedBeanPHP is an easy to use ORM tool for PHP. Automatically creates tables and columns as you go No configuration, just fire and forget

Gabor de Mooij 2.2k Jan 9, 2023
Spot v2.x DataMapper built on top of Doctrine's Database Abstraction Layer

Spot DataMapper ORM v2.0 Spot v2.x is built on the Doctrine DBAL, and targets PHP 5.4+. The aim of Spot is to be a lightweight DataMapper alternative

Spot ORM 602 Dec 27, 2022
PHP Database Migrations for Everyone

Phinx: Simple PHP Database Migrations Intro Phinx makes it ridiculously easy to manage the database migrations for your PHP app. In less than 5 minute

CakePHP 4.3k Jan 7, 2023
Database management in a single PHP file

Adminer - Database management in a single PHP file Adminer Editor - Data manipulation for end-users https://www.adminer.org/ Supports: MySQL, MariaDB

Jakub Vrána 5.5k Jan 1, 2023