Skip to content

PHP Query Builder - A quick way to build simple queries in PHP with MySQLi

License

Notifications You must be signed in to change notification settings

johnfacey/querybuilder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

About

PHP Query Builder - A quick way to build simple queries in PHP with MySQLi

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages