Skip to content
A database fetching library. Procedure oriented, Pre process, As supplement of ORM.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
tests
.gitignore
.travis.yml
composer.json
phpunit.xml
readme.md

readme.md

Sweeter-fetch - a database fetching library

Wrapper for PDO.

Procedure oriented, Pre process, As supplement of ORM.

Build Status Latest Stable Version Latest Unstable Version License

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.

You can’t perform that action at this time.