Skip to content

Latest commit

 

History

History
60 lines (39 loc) · 1.57 KB

README.md

File metadata and controls

60 lines (39 loc) · 1.57 KB

PHP Query Builder - PHP based Quick Query Builder

This project will let you perform quick queries in PHP to a MySQL (MySQLi) database.

Getting Started

Coming soon.

Prerequisites

Required:
    PHP
    IDE Any will do
    Local Webserver

## Installing

copy the querybuilder.php to a location within your project

Usage

In your PHP Code:

include('querybuilder.php');

$qBuild = new QueryBuilder($conn); 
$columns = "member_id,student_active,member_name,student_custom,student_rank,member_custom";
$w1 = new WhereBuilder("org_id","$org->org_id","="); 
$w2 = new WhereBuilder("member_custom","$member_barcode","=");
$whereList = array();
array_push($whereList,$w1);
array_push($whereList,$w2);

$thisMember = $qBuild->select('students')->columns($columns)->where($whereList)->run();

$firstMember = $thisStudent[0];

Valid data from the QueryBuilder will return an array of json rows or no rows if there is an error or the query found no records. This will be expanded in future documentaiton.

Logging

A Logger Module is in development

Built With

Authors

  • John Facey II - Lead Developer
    GitHub followers Twitter followers

License

License: MIT

See the LICENSE.md file for details