FaaPz / Pdo
Licence: mit
Just another PDO database library
Stars: ✭ 296
Labels
Projects that are alternatives of or similar to Pdo
Hydrahon
🐉 Fast & standalone PHP MySQL Query Builder library.
Stars: ✭ 194 (-34.46%)
Mutual labels: query-builder, pdo
database
A fluent SQL query builder for MySQL and MariaDB
Stars: ✭ 18 (-93.92%)
Mutual labels: pdo, query-builder
searchable
Pattern-matching search and reusable queries in laravel.
Stars: ✭ 28 (-90.54%)
Mutual labels: query-builder
FineCMS
PHP application using my own MVC architecture and PDO database interface.
Stars: ✭ 14 (-95.27%)
Mutual labels: pdo
database
Database SQL builder, written in Go, provides a convenient to creating and running database queries.
Stars: ✭ 26 (-91.22%)
Mutual labels: query-builder
query-builder
sql query builder library for crystal-lang
Stars: ✭ 47 (-84.12%)
Mutual labels: query-builder
thinkorm
A flexible, lightweight and powerful Object-Relational Mapper for Node.js. Support TypeScript!!
Stars: ✭ 33 (-88.85%)
Mutual labels: query-builder
Eloquent Builder
Provides an advanced filter for Laravel or Lumen model.
Stars: ✭ 264 (-10.81%)
Mutual labels: query-builder
SQG
Query Generation for Question Answering over Knowledge Bases
Stars: ✭ 43 (-85.47%)
Mutual labels: query-builder
react-query-builder
Simple, configurable react query builder
Stars: ✭ 37 (-87.5%)
Mutual labels: query-builder
sql-to-laravel-builder
SQL to Laravel Query Builder
Stars: ✭ 133 (-55.07%)
Mutual labels: query-builder
Ad-Hoc-Report-Builder-.net-mvc
Open Source Reporting tool for .NET6/.NET Core/.NET Framework that you can embed in your application and generate dashboards and ad hoc reports
Stars: ✭ 43 (-85.47%)
Mutual labels: query-builder
PdoOne
It simplifies the use of PDO in PHP by adding three methods: a simple wrapper between PDO, a query builder and an ORM.
Stars: ✭ 93 (-68.58%)
Mutual labels: query-builder
model-orm-php
PHP ORM Model class which provides table column/property mapping, CRUD, and dynamic finders/counters on a database table using PDO
Stars: ✭ 18 (-93.92%)
Mutual labels: pdo
active-persistence
Active Persistence is a implementation of Active Record Query Interface for JPA that makes it easy and fun.
Stars: ✭ 14 (-95.27%)
Mutual labels: query-builder
Datatable
Modular server side Datatable package for Laravel 5 for various client side table plugins
Stars: ✭ 52 (-82.43%)
Mutual labels: query-builder
Postgui
A React web application to query and share any PostgreSQL database.
Stars: ✭ 260 (-12.16%)
Mutual labels: query-builder
PDO
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.
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';
$pdo = new \FaaPz\PDO\Database($dsn, $usr, $pwd);
// SELECT * FROM users WHERE id = ?
$selectStatement = $pdo->select()
->from('users')
->where('id', '=', 1234);
$stmt = $selectStatement->execute();
$data = $stmt->fetch();
// INSERT INTO users ( id , usr , pwd ) VALUES ( ? , ? , ? )
$insertStatement = $pdo->insert(array(
"id" =>1234,
"usr" => "your_username",
"pwd" => "your_password"
))
->into("users");
$insertId = $insertStatement->execute();
// UPDATE users SET pwd = ? WHERE id = ?
$updateStatement = $pdo->update(array("pwd" => "your_new_password"))
->table("users")
->where(new Clause\Conditional("id", "=", 1234));
$affectedRows = $updateStatement->execute();
// DELETE FROM users WHERE id = ?
$deleteStatement = $pdo->delete()
->from("users")
->where(new Clause\Conditional("id", "=", 1234));
$affectedRows = $deleteStatement->execute();
The
sqlsrv
extension will fail to connect when using error modePDO::ERRMODE_EXCEPTION
(default). To connect, you will need to explicitly passarray(PDO::ATTR_ERRMODE => PDO::ERRMODE_WARNING)
(orPDO::ERRMODE_SILENT
) into the constructor, or override thegetDefaultOptions()
method when usingsqlsrv
.
Documentation
See DOCUMENTATION
Changelog
See CHANGELOG
License
See LICENSE
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].