13 best PHP SQL Database libraries in 2024

share link

by marketing.admin@openweaver.com dot icon Updated: Feb 11, 2023

technology logo
technology logo

Guide Kit Guide Kit Β 

PHP is a powerful, flexible programming language for web development. It’s easy to learn and use, making it one of the most popular languages on the web. PHP has a number of built-in functions for working with SQL databases. A major part of any web application is the database. PHP is one of the most popular server-side scripting languages. It has a lot of features and libraries that make it easy for developers to create complex websites and applications. PHP allows developers to work with databases either directly or through an abstraction layer called PDO (PHP Data Objects). Database libraries are packages that provide additional functionality to PDO, making it easier for developers to work with relational databases like MySQL or PostgreSQL. Some of the most widely used open source libraries for PHP SQL Database among developers include: php-crud-api - Single file PHP script that adds a REST API to a SQL database; countries-states-cities-database - World countries; php-my-sql-pdo-database-class - A database class for PHP MySQL which utilizes PDO.

php-crud-apiby mevdschee

PHP doticonstar image 3341 doticonVersion:v2.14.19doticon
License: Permissive (MIT)

Single file PHP script that adds a REST API to a SQL database

Support
    Quality
      Security
        License
          Reuse

            php-crud-apiby mevdschee

            PHP doticon star image 3341 doticonVersion:v2.14.19doticon License: Permissive (MIT)

            Single file PHP script that adds a REST API to a SQL database
            Support
              Quality
                Security
                  License
                    Reuse
                      PHP doticonstar image 5022 doticonVersion:v1.9doticon
                      License: Strong Copyleft (ODbL-1.0)

                      🌍 Discover our global repository of countries, states, and cities! πŸ™οΈ Get comprehensive data in JSON, SQL, XML, YAML, and CSV formats. Access ISO2, ISO3 codes, country code, capital, native language, timezones (for countries), and more. #countries #states #cities

                      Support
                        Quality
                          Security
                            License
                              Reuse

                                countries-states-cities-databaseby dr5hn

                                PHP doticon star image 5022 doticonVersion:v1.9doticon License: Strong Copyleft (ODbL-1.0)

                                🌍 Discover our global repository of countries, states, and cities! πŸ™οΈ Get comprehensive data in JSON, SQL, XML, YAML, and CSV formats. Access ISO2, ISO3 codes, country code, capital, native language, timezones (for countries), and more. #countries #states #cities
                                Support
                                  Quality
                                    Security
                                      License
                                        Reuse
                                          PHP doticonstar image 648 doticonVersion:Currentdoticon
                                          License: Others (Non-SPDX)

                                          A database class for PHP MySQL which utilizes PDO.

                                          Support
                                            Quality
                                              Security
                                                License
                                                  Reuse

                                                    php-my-sql-pdo-database-classby wickyaswal

                                                    PHP doticon star image 648 doticonVersion:Currentdoticon License: Others (Non-SPDX)

                                                    A database class for PHP MySQL which utilizes PDO.
                                                    Support
                                                      Quality
                                                        Security
                                                          License
                                                            Reuse

                                                              DBDiffby DBDiff

                                                              PHP doticonstar image 580 doticonVersion:v1.0.0doticon
                                                              License: Permissive (MIT)

                                                              Compare MySQL databases & automatically create schema & data change scripts/migrations rapidly (up & down SQL supported) for database version control. Supports *some* migration tools.

                                                              Support
                                                                Quality
                                                                  Security
                                                                    License
                                                                      Reuse

                                                                        DBDiffby DBDiff

                                                                        PHP doticon star image 580 doticonVersion:v1.0.0doticon License: Permissive (MIT)

                                                                        Compare MySQL databases & automatically create schema & data change scripts/migrations rapidly (up & down SQL supported) for database version control. Supports *some* migration tools.
                                                                        Support
                                                                          Quality
                                                                            Security
                                                                              License
                                                                                Reuse

                                                                                  Aura.Sqlby auraphp

                                                                                  PHP doticonstar image 535 doticonVersion:3.1.0doticon
                                                                                  License: Permissive (MIT)

                                                                                  SQL database access through PDO.

                                                                                  Support
                                                                                    Quality
                                                                                      Security
                                                                                        License
                                                                                          Reuse

                                                                                            Aura.Sqlby auraphp

                                                                                            PHP doticon star image 535 doticonVersion:3.1.0doticon License: Permissive (MIT)

                                                                                            SQL database access through PDO.
                                                                                            Support
                                                                                              Quality
                                                                                                Security
                                                                                                  License
                                                                                                    Reuse

                                                                                                      v8-archiveby directus

                                                                                                      PHP doticonstar image 509 doticonVersion:v8.8.1doticon
                                                                                                      no licences License: No License (null)

                                                                                                      Directus Database API β€” Wraps Custom SQL Databases with a REST/GraphQL API

                                                                                                      Support
                                                                                                        Quality
                                                                                                          Security
                                                                                                            License
                                                                                                              Reuse

                                                                                                                v8-archiveby directus

                                                                                                                PHP doticon star image 509 doticonVersion:v8.8.1doticonno licences License: No License

                                                                                                                Directus Database API β€” Wraps Custom SQL Databases with a REST/GraphQL API
                                                                                                                Support
                                                                                                                  Quality
                                                                                                                    Security
                                                                                                                      License
                                                                                                                        Reuse

                                                                                                                          cryptdbby CryptDB

                                                                                                                          PHP doticonstar image 422 doticonVersion:Currentdoticon
                                                                                                                          License: Others (Non-SPDX)

                                                                                                                          A database system that can process SQL queries over encrypted data.

                                                                                                                          Support
                                                                                                                            Quality
                                                                                                                              Security
                                                                                                                                License
                                                                                                                                  Reuse

                                                                                                                                    cryptdbby CryptDB

                                                                                                                                    PHP doticon star image 422 doticonVersion:Currentdoticon License: Others (Non-SPDX)

                                                                                                                                    A database system that can process SQL queries over encrypted data.
                                                                                                                                    Support
                                                                                                                                      Quality
                                                                                                                                        Security
                                                                                                                                          License
                                                                                                                                            Reuse

                                                                                                                                              databy atk4

                                                                                                                                              PHP doticonstar image 262 doticonVersion:4.0.0doticon
                                                                                                                                              License: Permissive (MIT)

                                                                                                                                              Data Access PHP Framework for SQL & high-latency databases

                                                                                                                                              Support
                                                                                                                                                Quality
                                                                                                                                                  Security
                                                                                                                                                    License
                                                                                                                                                      Reuse

                                                                                                                                                        databy atk4

                                                                                                                                                        PHP doticon star image 262 doticonVersion:4.0.0doticon License: Permissive (MIT)

                                                                                                                                                        Data Access PHP Framework for SQL & high-latency databases
                                                                                                                                                        Support
                                                                                                                                                          Quality
                                                                                                                                                            Security
                                                                                                                                                              License
                                                                                                                                                                Reuse

                                                                                                                                                                  migrationby byjg

                                                                                                                                                                  PHP doticonstar image 145 doticonVersion:4.2.3doticon
                                                                                                                                                                  License: Permissive (MIT)

                                                                                                                                                                  Simple library writen in PHP without framework dependancy for database version control. Supports Sqlite, MySql, Sql Server and Postgres

                                                                                                                                                                  Support
                                                                                                                                                                    Quality
                                                                                                                                                                      Security
                                                                                                                                                                        License
                                                                                                                                                                          Reuse

                                                                                                                                                                            migrationby byjg

                                                                                                                                                                            PHP doticon star image 145 doticonVersion:4.2.3doticon License: Permissive (MIT)

                                                                                                                                                                            Simple library writen in PHP without framework dependancy for database version control. Supports Sqlite, MySql, Sql Server and Postgres
                                                                                                                                                                            Support
                                                                                                                                                                              Quality
                                                                                                                                                                                Security
                                                                                                                                                                                  License
                                                                                                                                                                                    Reuse
                                                                                                                                                                                      PHP doticonstar image 143 doticonVersion:4.0.1doticon
                                                                                                                                                                                      License: Others (Non-SPDX)

                                                                                                                                                                                      A powerful, fast, cross-platform SQL Builder for PHP. Convert your structured data into SQL queries with a fluent style interface and targeting on all the mainstream database (MySQL, PostgreSQL, SQLite)

                                                                                                                                                                                      Support
                                                                                                                                                                                        Quality
                                                                                                                                                                                          Security
                                                                                                                                                                                            License
                                                                                                                                                                                              Reuse

                                                                                                                                                                                                SQLBuilderby c9s

                                                                                                                                                                                                PHP doticon star image 143 doticonVersion:4.0.1doticon License: Others (Non-SPDX)

                                                                                                                                                                                                A powerful, fast, cross-platform SQL Builder for PHP. Convert your structured data into SQL queries with a fluent style interface and targeting on all the mainstream database (MySQL, PostgreSQL, SQLite)
                                                                                                                                                                                                Support
                                                                                                                                                                                                  Quality
                                                                                                                                                                                                    Security
                                                                                                                                                                                                      License
                                                                                                                                                                                                        Reuse
                                                                                                                                                                                                          PHP doticonstar image 97 doticonVersion:v1.6.1doticon
                                                                                                                                                                                                          License: Permissive (MIT)

                                                                                                                                                                                                          Laravel database migrations with SQL views

                                                                                                                                                                                                          Support
                                                                                                                                                                                                            Quality
                                                                                                                                                                                                              Security
                                                                                                                                                                                                                License
                                                                                                                                                                                                                  Reuse

                                                                                                                                                                                                                    laravel-migration-viewsby staudenmeir

                                                                                                                                                                                                                    PHP doticon star image 97 doticonVersion:v1.6.1doticon License: Permissive (MIT)

                                                                                                                                                                                                                    Laravel database migrations with SQL views
                                                                                                                                                                                                                    Support
                                                                                                                                                                                                                      Quality
                                                                                                                                                                                                                        Security
                                                                                                                                                                                                                          License
                                                                                                                                                                                                                            Reuse
                                                                                                                                                                                                                              PHP doticonstar image 94 doticonVersion:3.4.1doticon
                                                                                                                                                                                                                              License: Strong Copyleft (GPL-2.0)

                                                                                                                                                                                                                              FirebirdWebAdmin is a web frontend for the Firebird SQL database server written in PHP.

                                                                                                                                                                                                                              Support
                                                                                                                                                                                                                                Quality
                                                                                                                                                                                                                                  Security
                                                                                                                                                                                                                                    License
                                                                                                                                                                                                                                      Reuse

                                                                                                                                                                                                                                        firebirdwebadminby mariuz

                                                                                                                                                                                                                                        PHP doticon star image 94 doticonVersion:3.4.1doticon License: Strong Copyleft (GPL-2.0)

                                                                                                                                                                                                                                        FirebirdWebAdmin is a web frontend for the Firebird SQL database server written in PHP.
                                                                                                                                                                                                                                        Support
                                                                                                                                                                                                                                          Quality
                                                                                                                                                                                                                                            Security
                                                                                                                                                                                                                                              License
                                                                                                                                                                                                                                                Reuse

                                                                                                                                                                                                                                                  laminas-dbby laminas

                                                                                                                                                                                                                                                  PHP doticonstar image 105 doticonVersion:2.17.0doticon
                                                                                                                                                                                                                                                  License: Permissive (BSD-3-Clause)

                                                                                                                                                                                                                                                  Database abstraction layer, SQL abstraction, result set abstraction, and RowDataGateway and TableDataGateway implementations

                                                                                                                                                                                                                                                  Support
                                                                                                                                                                                                                                                    Quality
                                                                                                                                                                                                                                                      Security
                                                                                                                                                                                                                                                        License
                                                                                                                                                                                                                                                          Reuse

                                                                                                                                                                                                                                                            laminas-dbby laminas

                                                                                                                                                                                                                                                            PHP doticon star image 105 doticonVersion:2.17.0doticon License: Permissive (BSD-3-Clause)

                                                                                                                                                                                                                                                            Database abstraction layer, SQL abstraction, result set abstraction, and RowDataGateway and TableDataGateway implementations
                                                                                                                                                                                                                                                            Support
                                                                                                                                                                                                                                                              Quality
                                                                                                                                                                                                                                                                Security
                                                                                                                                                                                                                                                                  License
                                                                                                                                                                                                                                                                    Reuse

                                                                                                                                                                                                                                                                      See similar Kits and Libraries