Sometimes I need to develop a small project like online contest or registration form or survey. Sometime if you using framework like Laravel is simply too time consuming and made by yourself is the quickest choice. For this situations I have found medoo.in as database connect system, very useful and secure.
They declare it is:
Only 15KB around with one file.
Extremely easy to learn and use, friendly construction.
Support various common and complex SQL queries.
Support various SQL database, including MySQL, MSSQL, SQLite, MariaDB, Oracle, Sybase, PostgreSQL and more.
Prevent SQL injection.
Under MIT license, you can use it anywhere if you want
and, in the end, it is true for me.