<?php
require('mini-config.php');
//Make Query in Database
/** Sample DB Strct
* table: users [id, username, password, status]
* */
/** Select all Records from users table */
$arrList = DBHandler::QueryArray('users');
/** Select all records with selected columns of users table */
$arrList = DBHandler::QueryArray('users', array('id', 'username', 'password', 'status'));
/** Select specific records of users table */
$arrList = DBHandler::QueryArray('users', array('id', 'username', 'password', 'status'), 'status = 1');
/** Select specific records and sort them by username of users table */
$arrList = DBHandler::QueryArray('users', array('id', 'username', 'password', 'status'), '', 'username asc');
/** Insert Records of users table */
$intUIN = DBHandler::Insert('users', array('username'=>'kabindra', 'password'=>'qwerty', 'status'=>1));
/** Update Records of users table */
$intUIN = DBHandler::Update('users', array('password'=>'newpassword'), 'username = "kabindra"');
/** Delete Records of users table */
$intUIN = DBHandler::Delete('users', 'username = "kabindra"');
|