1. Go to this page and download the library: Download quibble/query library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
quibble / query example snippets
$adapter = new class(/* connection params */) extends Quibble\Postgresql\Adapter
{
use Quibble\Query\Buildable;
};
$result = (new Insert($pdo, 'tablename'))->execute(['foo' => 'bar']);
// INSERT INTO tablename (foo) VALUES (?) with bound parameter 'bar'
// Insert up to n rows:
$query->execute($array1, $array2, $arrayn);
$query = $pdo->insert('fooTable');
$query = new Quibble\Query\Update($pdo, $tableName);
// or, alternatively:
$query = $pdo->update($tableName);
$query->where('foo = ? AND bar = ?', $foo, $bar)
->execute(['baz' => $foobar]);
// UPDATE tableName SET baz = ? WHERE foo = ? AND bar = ?
// with bindings foo, bar and foobar.
$query = new Quibble\Query\Delete($pdo, $tableName);
// or, alternatively:
$query = $pdo->delete($tableName);
$query->where('foo = ? AND bar = ?', $foo, $bar)
->execute();
// DELETE FROM tableName WHERE WHERE foo = ? AND bar = ?
// with bindings foo and bar.
class MySelect extends Quibble\Query\Select
{
// ...whatever custom logic you need...
}
$adapter = new class(...connection...) extends Adapter {
use Buildable;
public function select(string|Select $table)
{
return new MySelect($this, $table);
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.