qdladoooo/laravel-sweeter-fetch

Sweeter-fetch for laravel.

v0.5 2016-06-15 07:51 UTC

This package is not auto-updated.

Last update: 2024-04-25 00:38:03 UTC


README

Wrapper of PDO.

Procedure oriented, Pre process, As supplement of ORM.

Latest Stable Version Latest Unstable Version License

Installation

composer require qdladoooo/laravel-sweeter-fetch

Initialization

use SweeterFetch\LaravelSF;

//take db_connection as parameter 
$sf = new LaravelSF();

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 laravel-sweeter-fetch is open-sourced software licensed under the MIT license.