qdladoooo / sweeter-fetch
Sweeter-fetch, a wrapper of PDO. Procedure oriented, pre process, as supplement of ORM.
Installs: 36
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 1
Forks: 0
Open Issues: 1
Type:libraty
Requires
- php: ^7.0
- ext-pdo: *
Requires (Dev)
- phpunit/phpunit: ~5.4
This package is not auto-updated.
Last update: 2024-11-23 20:31:35 UTC
README
Wrapper for PDO.
Procedure oriented, Pre process, As supplement of ORM.
Installation
composer require qdladoooo/sweeter-fetch
Initialization
require "../vendor/autoload.php"; use SweeterFetch\SweeterFetch; $sf = new SweeterFetch('host', 'username', 'password');
Use
Execute none query
//return nothing $sf->Enq('use candy_shop;');
Execute query
//return [row1, row2, ...] $sf->Eq($sql);
Execute one row
//return the first row by array $sf->Eor($sql);
Execute column
//return a column $sf->Ec($sql);
Execute scalar
//return a number $sf->Es($sql);
License
The Sweeter-fetch is open-sourced software licensed under the MIT license.