canteen / database
Abstract mysqli library for use with the Canteen Framework.
Requires
- php: >=5.4.0
This package is not auto-updated.
Last update: 2020-03-02 04:27:50 UTC
README
#Canteen Database
Abstract mysqli library for use with the Canteen Framework. For documentation of the codebase, please see Canteen Database docs.
##Installation
Install is available using Composer.
composer require canteen/database dev-master
Including using the Composer autoloader in your index.
require 'vendor/autoload.php';
##Setup
use Canteen\Database; $db = new Database( 'localhost', // MySQL host 'root', // MySQL username '12341234', // MySQL user's password 'my_database' // Database name );
##Sample Usage
Create SQL queries with a simple, intuitive, object-oriented API.
// Create a select query of a properties // on a user's table of all active users $users = $db->select('user_id', 'first_name', 'last_name') ->from('users') ->where('active=1') ->results();
###Rebuild Documentation
This library is auto-documented using YUIDoc. To install YUIDoc, run sudo npm install yuidocjs
. Also, this requires the project CanteenTheme be checked-out along-side this repository. To rebuild the docs, run the ant task from the command-line.
ant docs
##License##
Copyright (c) 2013 Matt Karl
Released under the MIT License.