Easy-to-use PDO wrapper for PHP projects.

Overview

EasyDB - Simple Database Abstraction Layer

Build Status Latest Stable Version Latest Unstable Version License Downloads

PDO lacks brevity and simplicity; EasyDB makes separating data from instructions easy (and aesthetically pleasing).

EasyDB was created by Paragon Initiative Enterprises as part of our effort to encourage better application security practices.

Check out our other open source projects too.

If you're looking for a full-fledged query builder, check out Latitude and Aura.SqlQuery, which can be used with EasyDB.

If you'd like to use EasyDB but cache prepared statements in memory for multiple queries (i.e. to reduce database round-trips), check out our EasyDB-Cache wrapper class.

Installing EasyDB

First, get Composer, if you don't already use it.

Next, run the following command:

/path/to/your/local/composer.phar require paragonie/easydb:^2

If you've installed Composer in /usr/bin, you can replace /path/to/your/local/composer.phar with just composer.

Why Use EasyDB? Because it's cleaner!

Let's refactor a dangerous PHP snippet that previously used string concatenation to pass user input instead of prepared statements. For example, imagine something that just dropped {$_GET['blogpostid']} into the middle of a mysql_query() statement. Let's make it secure.

The PDO Way

$db = new \PDO(
    'mysql:host=localhost;dbname=something',
    'username',
    'putastrongpasswordhere'
);

$statement = $db->prepare('SELECT * FROM comments WHERE blogpostid = ? ORDER BY created ASC');
$exec = $statement->execute([$_GET['blogpostid']]);
$rows = $statement->fetchAll(\PDO::FETCH_ASSOC);
foreach ($rows as $row) {
    $template_engine->render('comment', $row);
}

That's a little wordy for such a simple task. If we do this in multiple places, we end up repeating ourselves a lot.

The EasyDB Solution

$db = \ParagonIE\EasyDB\Factory::fromArray([
    'mysql:host=localhost;dbname=something',
    'username',
    'putastrongpasswordhere'
]);

$rows = $db->run('SELECT * FROM comments WHERE blogpostid = ? ORDER BY created ASC', $_GET['blogpostid']);
foreach ($rows as $row) {
    $template_engine->render('comment', $row);
}

We made it a one-liner.

What else can EasyDB do quickly?

Insert a row into a database table

$db->insert('comments', [
    'blogpostid' => $_POST['blogpost'],
    'userid' => $_SESSION['user'],
    'comment' => $_POST['body'],
    'parent' => isset($_POST['replyTo']) ? $_POST['replyTo'] : null
]);

This is equivalent to the following SQL query (assuming $_POST['blogpostid'] is equal to 123, $_SESSION['user'] is equal to 234, $_POST['body'] is equal to test, and $_POST['replyTo'] is equal to 3456):

INSERT INTO comments (blogpostid, userid, comment, parent) VALUES (
    123,
    234,
    'test',
    3456
);

Build an insert without executing

$sql = $db->buildInsertQuery('comments', [
    'blogpostid',
    'userid',
    'comment'
]);

// INSERT INTO comments (blogpostid, userid, comment) VALUES (?, ?, ?)

$result = $db->q(
    $sql,
    $values,
    \PDO::FETCH_BOTH,
    true
);

Update a row from a database table

$db->update('comments', [
    'column' => 'foo',
    'otherColumn' => 123456,
    'approved' => true
], [
    'commentid' => $_POST['comment']
]);

This is equivalent to the following SQL query (assuming $_POST['comment'] is equal to 789):

UPDATE comments
SET 
  column = 'foo',
  otherColumn = 123456,
  approved = TRUE
WHERE commentid = 789

Delete a row from a database table

// Delete all of this user's comments
$db->delete('comments', [
    'userid' => 3
]);

This is equivalent to the following SQL query:

DELETE FROM comments WHERE userid = 3

Fetch a single row from a table

$userData = $db->row(
    "SELECT * FROM users WHERE userid = ?",
    $_GET['userid']
);

Note: This expects a variadic list of arguments, not an array. If you have multiple parameters, stack them like this:

$userData = $db->row(
    "SELECT * FROM users WHERE userid = ? AND other = ?",
    $_GET['userid'],
    $_GET['other']
);

This is wrong:

$userData = $db->row(
    "SELECT * FROM users WHERE userid = ? AND other = ?",
    array($userid, $other) // WRONG, should not be in an array
);

Fetch a single column from a single row from a table

$exists = $db->cell(
    "SELECT count(id) FROM users WHERE email = ?",
    $_POST['email']
);

/* OR YOU CAN CALL IT THIS WAY: */
$exists = $db->single(
    "SELECT count(id) FROM users WHERE email = ?",
    array(
        $_POST['email']
    )
);

Note: cell() expects a variadic list of arguments, not an array. If you have multiple parameters, stack them like this:

$exists = $db->cell(
    "SELECT count(id) FROM users WHERE email = ? AND username = ?",
    $_POST['email'],
    $_POST['usenrame']
);

This is wrong:

$exists = $db->cell(
    "SELECT count(id) FROM users WHERE email = ? AND username = ?",
    array($email, $username) // WRONG, should not be in an array
);

Alternatively, you can use single() instead of cell() if you really want to pass an array.

Try to perform a transaction

$save = function (EasyDB $db) use ($userData, $query) : int {
    $db->safeQuery($query, [$userData['userId']]);
    return \Some\Other\Package::CleanUpTable($db);
};
// auto starts, commits and rolls back a transaction as necessary
$returnedInt = $db->tryFlatTransaction($save);

Generate dynamic query conditions

$statement = EasyStatement::open()
    ->with('last_login IS NOT NULL');

if (strpos($_POST['search'], '@') !== false) {
    // Perform a username search
    $statement->orWith('username LIKE ?', '%' . $db->escapeLikeValue($_POST['search']) . '%');
} else {
    // Perform an email search
    $statement->orWith('email = ?', $_POST['search']);
}

// The statement can compile itself to a string with placeholders:
echo $statement; /* last_login IS NOT NULL OR username LIKE ? */

// All the values passed to the statement are captured and can be used for querying:
$user = $db->single("SELECT * FROM users WHERE $statement", $statement->values());

Note: Passing values with conditions is entirely optional but recommended.

Variable number of "IN" arguments

// Statements also handle translation for IN conditions with variable arguments,
// using a special ?* placeholder:
$roles = [1];
if ($_GET['with_managers']) {
    $roles[] = 2;
}

$statement = EasyStatement::open()->in('role IN (?*)', $roles);

// The ?* placeholder is replaced by the correct number of ? placeholders:
echo $statement; /* role IN (?, ?) */

// And the values will be unpacked accordingly:
print_r($statement->values()); /* [1, 2] */

Grouping of conditions

// Statements can also be grouped when necessary:
$statement = EasyStatement::open()
    ->group()
        ->with('subtotal > ?')
        ->andWith('taxes > ?')
    ->end()
    ->orGroup()
        ->with('cost > ?')
        ->andWith('cancelled = 1')
    ->end();

echo $statement; /* (subtotal > ? AND taxes > ?) OR (cost > ? AND cancelled = 1) */

What if I need PDO for something specific?

$pdo = $db->getPdo();

Can I create an EasyDB wrapper for an existing PDO instance?

Yes! It's as simple as doing this:

$easy = new \ParagonIE\EasyDB\EasyDB($pdo, 'mysql');

How do I run tests ?

vendor/bin/phpunit

Troubleshooting Common Issues

Only one-dimensional arrays are allowed

This comes up a lot when trying to pass an array of parameters to run().

EasyDB::run() expects a query string, then any number of optional parameters. It does NOT expect an array of all the parameters.

If you want to use an API that looks like $obj->method($string, $array), use safeQuery() instead of run().

<?php
/**
 * @var EasyDB $db
 * @var string $query
 * @var array $params 
 */
- $rows = $db->run($query, $params);
+ $rows = $db->safeQuery($query, $params);

Alternatively, you can flatten your array with the splat operator:

<?php
/**
 * @var EasyDB $db
 * @var string $query
 * @var array $params 
 */
- $rows = $db->run($query, $params);
+ $rows = $db->run($query, ...$params);

EasyDB's run() method is a variadic wrapper for safeQuery(), so either solution is correct.

Support Contracts

If your company uses this library in their products or services, you may be interested in purchasing a support contract from Paragon Initiative Enterprises.

Comments
  • How to run CREATE TABLE queries? (run and query methods fail)

    How to run CREATE TABLE queries? (run and query methods fail)

    I have the following setup:

    $db = Factory::create('sqlite:memory.db');
    $db->run($sql);
    // respectively
    $db->query($sql);
    

    The following CREATE TABLE query:

    CREATE TABLE IF NOT EXISTS predicate (
        id      INTEGER PRIMARY KEY AUTOINCREMENT,
        value   TEXT,
        UNIQUE(value)
    );
    

    fails to run using run and query method.

    run method

    Error:

    TypeError: Argument 1 passed to ParagonIE\EasyDB\EasyDB::getResultsStrictTyped() 
    must be an instance of PDOStatement, boolean given, called in 
    .../vendor/paragonie/easydb/src/EasyDB.php on line 759
    
    .../vendor/paragonie/easydb/src/EasyDB.php:1042
    ...vendor/paragonie/easydb/src/EasyDB.php:759
    .../vendor/paragonie/easydb/src/EasyDB.php:722
    .../Adapter/SQliteMemory/Store.php:81
    .../Adapter/SQliteMemory/StoreTest.php:14
    

    query method

    TypeError: Return value of ParagonIE\EasyDB\EasyDB::query() must be an instance of 
    PDOStatement, boolean returned
    
    .../vendor/paragonie/easydb/src/EasyDB.php:1197
    .../src/beardfulldb/Adapter/SQliteMemory/Store.php:81
    

    What did i wrong?

    opened by k00ni 19
  • EasyStatement throws exception when the array is empty

    EasyStatement throws exception when the array is empty

    Sometimes there is a need to build complex WHERE clauses and building the EasyStatement conditionally is not very convenient. If the values array is null EasyStatement should not add that WHERE clause to the SQL instead of letting PHP dump about incorrect number of arguments.

    Example:

    $dynamicArray = []; // Values are dynamically build somewhere else, but the array could also be empty
    EasyStatement::open()->in('`Id` IN (?*)', $dynamicArray);
    

    The result of this will be:

    Warning: str_repeat(): Second argument has to be greater than or equal to 0 in ...EasyStatement.php on line 380

    To avoid the exception I need to check if the array is empty before adding the next clause to EasyStatement

    opened by kamil-tekiela 14
  • Installation / use?

    Installation / use?

    Hi, can you maybe add a short installation how-to for people not using Composer? Not everyone has his/her own server, I'm using shared hosting. Thanks.

    opened by akak0r 12
  • Add escape functions

    Add escape functions

    Having separate functions for various levels of escaping allows for a balance between efficiency and robustness. This introduces 3 separate functions for:

    • Escaping unqualified identifiers
    • Escaping qualified identifiers
    • Escaping expressions that use qualified identifiers

    Each depends on the functionality of the former.

    enhancement 
    opened by shadowhand 11
  • How is the right way with row function and multi parameters ?

    How is the right way with row function and multi parameters ?

    i try: $db->row("SELECT * FROM customers WHERE email = ? AND actkey = ?",array($email,$actkey)); but it don't work. Error comes up : Only one-dimensional arrays are allowed, what did i wrong ?

    opened by DLX23 8
  • Connection issues

    Connection issues

    I can connect to my database using straight PDO. But, cannot connect using easydb. It gives PDO connection error. Check username & password. I am using V2.0.0 with Php 7.2. In addition, the error displays username and password and would like to suppress those.

    opened by anant-shah 8
  • Multiple IN's

    Multiple IN's

    Would like to be able to use multiple IN's in a WHERE statement without errors about only one dimensional arrays being allowed.

    $states[] = (IL, IN, VA);
    run("SELECT id FROM states WHERE state IN (?)", $states);
    

    The only way to achieve this is to do the following, which leaves one open to injection attacks, right?

    run("SELECT id FROM states WHERE state IN (" . implode(',', $states) . ")");

    opened by ParadiseStudios 6
  • Allow more characters in field names

    Allow more characters in field names

    I tried to use EasyDB with an in-memory sqlite DB with special field names in the table. EasyDB doesn't accept them. I changed allowSeperators to true but than it filters characters from my fieldlist and doesn't find it anymore. SQlite itself doesn't have problems with this.

    To reproduce, try this:

    $db = \ParagonIE\EasyDB\Factory::create('sqlite::memory:');
    php > $db->setAllowSeparators(true);
    php > $db->run('create table test(`a/b` TEXT);'); // works
    php > $db->insert('test', [ 'a/b' => "test" ]); // exception thrown
    

    Causes:

    Warning: Uncaught PDOException: SQLSTATE[HY000]: General error: 1 table test has no column named ab in /usr/src/app/vendor/paragonie/easydb/src/EasyDB.php:641
    Stack trace:
    #0 /usr/src/app/vendor/paragonie/easydb/src/EasyDB.php(641): PDO->prepare('INSERT INTO "te...')
    #1 /usr/src/app/vendor/paragonie/easydb/src/EasyDB.php(434): ParagonIE\EasyDB\EasyDB->safeQuery('INSERT INTO "te...', Array, 4, true)
    #2 php shell code(1): ParagonIE\EasyDB\EasyDB->insert('test', Array)
    #3 {main}
      thrown in /usr/src/app/vendor/paragonie/easydb/src/EasyDB.php on line 641
    
    opened by ponchofiesta 6
  • Multiple issues with EasyDB::insertGet

    Multiple issues with EasyDB::insertGet

    The documentation for this function doesn't clearly explain its purpose. As best I can tell, it's intended to insert a row, then return its auto-increment ID. (Is this accurate?)

    The straightforward way of doing this would be to use PDO::lastInsertId(), which is already exposed as EasyDB::lastInsertId(). However, insertGet() instead takes the roundabout approach of performing a follow-up SELECT using every column in the inserted data as a condition. This is likely to result in strange query plans, especially in tables with many indices. Under some contrived circumstances (e.g, a table with an index covering a low-cardinality column and a monotonically decreasing column), the resulting plan may end up scanning a large portion of the table before finding the intended row.

    If insertGet() is called with a $map which matches data which already exists in the table and $field is not the auto-increment column, the value returned by insertGet() may correspond to a different row than the one which was most recently inserted. (Under the mysql and pgsql drivers, it will be the largest value which exists in a matching row; under other drivers, it will be an arbitrary value.)

    If $map is empty, the SELECT will fail entirely, as the WHERE clause is empty.

    opened by duskwuff 5
  • Possible credentials leak

    Possible credentials leak

    I was reached by a user concerned of the possible leak of the database credentials when an error occurs during Factory:create() call:

    PHP Fatal error: Uncaught ParagonIE\EasyDB\Exception\ConstructorFailed: Could not create a PDO connection. Please check your username and password. in vendor/paragonie/easydb/src/Factory.php:77 Stack trace: #0 0.php(10): ParagonIE\EasyDB\Factory::create('mysql:host=loca...', 'username', 'putastrongpassw...') #1 {main} thrown in vendor/paragonie/easydb/src/Factory.php on line 77

    The problem is coming from the fact that Factory::create()'s parameters are listed in the stack trace.

    I offered a user a quick and dirty solution of wrapping the call into a try catch and then re-throwing a generic exception that contains the error message from the caught exception.

    But that's only a workaround and I think it would be better to change the Factory::create() method's signature. the simplest solution would be to make the method to accept an array of parameters instead of an explicit list of variables. This is against the best practices but here I would think it would be a good tradeoff between good practices and security.

    I could send a pull request if you agree for this change. Or we can try to find some other solution.

    opened by colshrapnel 4
  • Thows 'Only one-dimensional arrays are allowed' usin 1D array

    Thows 'Only one-dimensional arrays are allowed' usin 1D array

    $rows = $db->run('SELECT ?', 1); // works
    $rows = $db->run('SELECT ?', [1]); // Error
    

    How to run select query with multiple bind variables? for example:

    SELECT
        id,
        username AS "nam",
        email AS "user_email",
        COUNT(*) AS "some_count"
    FROM
        "users"
    WHERE
        username = :_1_
        AND surname = :_2_
    GROUP BY
        id,
        email
    
    question 
    opened by rozdol 4
  • Undefined variable $template_engine

    Undefined variable $template_engine

    I followed the installation instructions for composer.

    Your examples use $template_engine, like: $template_engine->render('comment', $row);

    I get this error:

    Warning: Undefined variable $template_engine in /home/xyz/easydb/test.php on line 25 Fatal error: Uncaught Error: Call to a member function render() on null in

    I've search the whole source code and I'm not able to find a reference to $template_engine. What am I missing?

    opened by smalos 2
  • Some bug when filter data by column type bit(1)

    Some bug when filter data by column type bit(1)

    When filter some data where type of column bit(1) (like true, false) and filter true then request return nothing.

    $db->run("SELECT t2.`comment_id` AS `comment_id`, 
    t2.`text` AS `text`, 
    BIT_COUNT(t2.`public`) AS `public`, 
    t2.`updated` AS `updated`, 
    t2.`created` AS `created`, 
    BIT_COUNT(t2.`archived`) AS `archived`
    FROM `tasks_comments` AS t2
    WHERE t2.`task_id` = ? AND (t2.`public` = ?)
    ORDER BY t2.`comment_id` ASC", 24408, true);
    

    But when make request without include value of filter in function, request return correct data

    $db->run("SELECT t2.`comment_id` AS `comment_id`, 
    t2.`text` AS `text`, 
    BIT_COUNT(t2.`public`) AS `public`, 
    t2.`updated` AS `updated`, 
    t2.`created` AS `created`, 
    BIT_COUNT(t2.`archived`) AS `archived`
    FROM `tasks_comments` AS t2
    WHERE t2.`task_id` = ? AND (t2.`public` = 1)
    ORDER BY t2.`comment_id` ASC", 24408);
    

    How I understand, it's bug because All values are treated as PDO::PARAM_STR.

    When set filter false, it works current. But with true incorrect. How can fix it? When need to use as argument in function?

    PHP 7.4. MySQL 8.0

    opened by RuslanMelnychenko 0
Releases(v3.0.2)
  • v3.0.2(Jun 8, 2022)

  • v3.0.1(May 21, 2022)

    • #143: Don't assume the array passed to insertMany() is indexed at 0.
    • Fixed the type declaration of the $duplicates_mode parameter to be nullable in buildInsertQueryBoolSafe().
    Source code(tar.gz)
    Source code(zip)
  • v3.0.0(May 11, 2022)

    • #141: Increased minimum PHP Version to 8.0
      • Lots of code refactoring went into this, including strict-typing with PHP 8's new support for Union Types.
    • #142: Added support for Psalm Security Analysis
    Source code(tar.gz)
    Source code(zip)
  • v2.12.0(May 11, 2022)

    • Migrated from Travis CI to GitHub Actions
    • #136: Added EasyPlaceholder for calling SQL functions on insert/update queries
    • #137: Added csv() method to satisfy feature request #100
    • Miscellaneous boyscouting
    Source code(tar.gz)
    Source code(zip)
  • v2.11.0(Jan 20, 2020)

  • v2.10.0(Aug 15, 2019)

    • You can now pull the original exception (which may leak credentials via stack trace) from a ConstructorFailed exception by calling the new getRealException() method.
    • Added insertIgnore() (Insert a row into the table, ignoring on key collisions)
    • Added insertOnDuplicateKeyUpdate() (Insert a row into the table; or if a key collision occurs, doing an update instead)
    • #111: EasyStatement: Don't fail with empty IN() statements
    Source code(tar.gz)
    Source code(zip)
  • v2.9.0(Mar 12, 2019)

    • You can now side-step credential leakage in the Factory class by calling Factory::fromArray([$dsn, $username, $password, $options]) instead of Factory::create($dsn, $username, $password, $options).
    Source code(tar.gz)
    Source code(zip)
  • v1.7.0(Oct 1, 2018)

    Congruent with 2.7.0's changes

    Changed the behavior of several public APIs to invoke $this->prepare() instead of $this->pdo->prepare(). This might seem subtle, but in actuality, it allows classes that extend EasyDB to implement prepared statement caching.

    Seeing as PHP 5 is reaching EOL soon, you want v2.x instead of 1.x, but for legacy software this change can make EasyDB more useful.

    Source code(tar.gz)
    Source code(zip)
  • v2.7.0(Sep 23, 2018)

    Changed the behavior of several public APIs to invoke $this->prepare() instead of $this->pdo->prepare(). This might seem subtle, but in actuality, it allows classes that extend EasyDB to implement prepared statement caching.

    See https://github.com/paragonie/easydb-cache for more information

    Source code(tar.gz)
    Source code(zip)
  • v2.6.2(Jun 14, 2018)

  • v1.6.2(Jun 14, 2018)

  • v2.6.1(May 1, 2018)

    We've stopped the 5to7 approach of releasing v1 branches, due to reasons outlined in the v1.x-legacy branch. To that end, the v2 branch now correctly requires PHP 7. This isn't a BC break since v2 of EasyDB would just syntax error on PHP 5 anyway.

    Bug fixes:

    • #77: Detect when the driver is missing and throw a distinct error message to aid in debugging.
    Source code(tar.gz)
    Source code(zip)
  • v1.6.1(May 1, 2018)

    Although PHP 5.5 is EOL'd, a lot of software we want to migrate away from old-styte database code still exists. Making EasyDB run on PHP 5.5 is a net positive win for the community.

    Changes:

    • EasyDB v1 now runs on PHP 5.5

    To that end, we've stopped the 5to7 approach of releasing v1 branches, since no PHP 7-to-5 transpiler handles PHP 5.5 support. We might as well maintain this in its own branch (v1.x-legacy).

    Source code(tar.gz)
    Source code(zip)
  • v2.6.0(Mar 10, 2018)

    • #69: Fixed an error when using EasyDB with SQLite.
    • #70: You can now use EasyStatement objects for the conditions instead of arrays in EasyDB::update() and EasyDB::delete(). (Arrays are still supported!)
    Source code(tar.gz)
    Source code(zip)
  • v2.5.1(Dec 27, 2017)

  • v2.5.0(Dec 18, 2017)

    • #56: EasyDB::q() and EasyDB::row() no longer explicitly force PDO::FETCH_ASSOC. Thanks @nfreader.
    • #57: Added EasyDB::insertReturnId() which wraps insert() and lastInsertId(). Important: Do not use this on PostgreSQL, as it is not reliable. Use insertGet() instead, as you normally would have. Reported by @duskwuff.
    • #58: Empty EasyStatement clauses no longer cause broken queries. Reported by @duskwuff.
    • #59: Fixed grouping/precedence issues with EasyStatement subqueries. Reported by @duskwuff.
    Source code(tar.gz)
    Source code(zip)
  • v2.4.0(Nov 18, 2017)

    • Thanks to @SignpostMarv, you can now easily run an entire block of code in a flat transaction:
      $easyDb->tryFlatTransaction(function (EasyDB $db) { /* ... */ });
    • EasyDB is now fully type-safe. This is verified by Psalm. If you're using a static analysis tool on your project that uses EasyDB, this should eliminate a lot of false positive findings.
    • We now allow the / character to be used in SQLite identifiers.
    Source code(tar.gz)
    Source code(zip)
  • v2.3.1(May 10, 2017)

  • v1.3.1(May 10, 2017)

  • v2.3.0(Jan 12, 2017)

  • v1.3.0(Jan 12, 2017)

  • v2.2.1(Nov 23, 2016)

  • v1.2.1(Nov 23, 2016)

  • v2.2.0(Nov 4, 2016)

  • v1.2.0(Nov 4, 2016)

  • v2.1.1(Nov 1, 2016)

  • v1.1.1(Nov 1, 2016)

  • v1.1.0(Oct 22, 2016)

  • v2.1.0(Oct 22, 2016)

  • v2.0.1(Oct 19, 2016)

Owner
Paragon Initiative Enterprises
Technology should support your ambitions, not hinder them. We are a team of technology consultants that specialize in application security.
Paragon Initiative Enterprises
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
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
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
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
Just another PDO database library

PDO Just another PDO database library Installation Use Composer $ composer require faapz/pdo Usage Examples selecting, inserting, updating and deletin

Fabian de Laender 313 Oct 11, 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
Eloquent Filter is a package for filter data of models by the query strings. Easy to use and fully dynamic.

Eloquent Filter Eloquent Filter adds custom filters to your Eloquent Models in Laravel. It's easy to use and fully dynamic. Table of Content Introduct

Mehdi Fathi 327 Dec 28, 2022
An easy-to-use Artisan command to create a new database schema.

Laravel Create DB This package adds an easy-to-use Artisan command to your application that allows you to create a new database schema. The package is

Aron Rotteveel 11 Dec 29, 2022
php ClickHouse wrapper

PHP ClickHouse wrapper Features No dependency, only Curl (support php >=7.1 ) Select parallel queries (asynchronous) Asynchronous bulk inserts from CS

SMI2 598 Jan 2, 2023
A simple wrapper for hCaptcha

hCaptcha Wrapper Quick start Sign up at hCaptcha. Fetch your public key and site key from the settings tab. Get this package composer require pablosan

Pablo Sanches 4 Nov 19, 2021
MOP is a php query handling and manipulation library providing easy and reliable way to manipulate query and get result in a fastest way. ( WEBSITE VERSION )

Mysql Optimizer mysql optimizer also known as MOP is a php query handling and manipulation library providing easy and reliable way to manipulate query

null 3 Feb 14, 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
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
Database lookup tool in php, skidlookup has not been claimed so if u want to use this src all right's go to u, idea came from fedsearch

skidlookup Database lookup tool in php, skidlookup has not been claimed so if u want to use this src, all right's go to u, idea came from fedsearch in

Nano 12 Dec 1, 2021
Database lookup tool in php, skidlookup has not been claimed so if u want to use this src all right's go to u, idea came from fedsearch

skidlookup Database lookup tool in php, skidlookup has not been claimed so if u want to use this src, all right's go to u, idea came from fedsearch in

Nano 12 Dec 1, 2021
Php mongodb admin, use new mongodb extension.

EasyMongo EasyMongo is a Mongodb web management application. This project is based on iwind/RockMongo, uses the latest mongodb-extension + mongo-php-l

Meng Wang 8 Oct 31, 2022
Articulate - An alternative ORM for Laravel, making use of the data mapper pattern

Articulate Laravel: 8.* PHP: 8.* License: MIT Author: Ollie Read Author Homepage: https://ollie.codes Articulate is an alternative ORM for Laravel bas

Ollie Codes 4 Jan 4, 2022
TO DO LIST WITH LOGIN AND SIGN UP and LOGOUT using PHP and MySQL please do edit the _dbconnect.php before viewing the website.

TO-DO-LIST-WITH-LOGIN-AND-SIGN-UP TO DO LIST WITH LOGIN AND SIGN UP and LOGOUT using PHP and MySQL please do edit the _dbconnect.php before viewing th

Aniket Singh 2 Sep 28, 2021
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