Download the PHP package requtize/query-builder without Composer

On this page you can find all versions of the php package requtize/query-builder. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package query-builder

QueryBuilder

Query Builder is a fast, simple, methods-chaining, dependency-free library to create SQL Queries simple and fast to write, extend and manage. Supports databases which are supported by PDO. Can be also used as Database Abstraction Layer.

Installation - via composer.json

Usage whith connection estabilished before, in some other system's part.

Query Builder Methods

Table selection

Selects

Wheres

If method not starts with "or*, multiple calls will join it as "AND".

Wheres (all methods above) can also take Closure as first argument. This can make sub-criterias. Sub-criterias will be joined to main query using joined from used method. As argument of the anonymous function is object NestedCriteria that allows You to use all the where() methods above.

Wheres can also take as first argument RAW query section in two ways. First - all full criteria (column name, operator and value), or only columns/table-column value n first parameter, and value as second.

Joins

Resutls set

Inserts

If insert call operate on table with AUTO_INCREMENT column, method will return inserted ID of row. Also You can use another method (after call insert() method) to do the same thing:

Update

Delete

RAW values

In most of all methods and parameters You can pass the RAW value as argument. To do this You have to only use raw() method and pass the result of this method to any argument You want.

Raw query

Sub-Queries and Nested Queries

In some cases You might need to create SubQuery to provide some special functionality. Use the subQuery() method to do this thing. Examples of usage:

Generated query by Query Builder.

Get compiled Query

If You want to preview a query, before execution, or for debugging intensions, You may want use getQuery() method, which returns Query object, with compiled query (with placeholders), array of bindings and the PDO instance. This object contains all data of current Query Builder instance.

API

@todo


All versions of query-builder with dependencies

PHP Build Version
Package Version
Requires php Version ~5.5 || ^7.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package requtize/query-builder contains the following files

Loading the files please wait ....