Download the PHP package c9s/sqlbuilder without Composer

On this page you can find all versions of the php package c9s/sqlbuilder. 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 sqlbuilder

SQLBuilder for PHP

Build Status Coverage Status Latest Stable Version Total Downloads Monthly Downloads Latest Unstable Version License

If you're looking for something that is not an ORM but can generate SQL for you, you just found the right one.

SQLBuilder is not an ORM (Object relational mapping) system, but a toolset that helps you generate cross-platform SQL queries in PHP.

SQLBuilder is a stand-alone library, you can simply install it through composer or just require them (the class files) with your autoloader, and it has no dependencies.

Features

Synopsis

Here is a short example of using Universal SelectQuery

A More Detailed Description

Unlike other SQL utilities, SQLBuilder let you define the quote style and the parameter marker type. there are 2 parameter marker type you can choose:

  1. Question mark parameter marker (?)
  2. Named parameter. (:id, :name, :address, :p1)

The above two are supported by PDO directly, and the first one is also supported by mysqli, pgsql extension.

The API is dead simple, easy to remember, you can just define one query, then pass different query driver to the query object to get a different SQL string for your targettting platform.

It also supports cross-platform query generation, there are three types of query (currently): Universal, MySQL, PgSQL. The Universal queries are cross-platform, you can use them to create a cross-platform PHP API of your database system, and the supported platforms are: MySQL, PgSQL and SQLite.

Universql Queries:

To see the implementation details, you can check the source code inside Universal namespace: https://github.com/c9s/SQLBuilder/tree/master/SQLBuilder/Universal/Query

MySQL Queries:

For MySQL platform, the implementation is according to the specification of MySQL 5.6.

For PostgreSQL platform, the implementation is according to the specification of PostgreSQL 9.2.

Installation

Install through Composer

composer require corneltek/sqlbuilder

Getting Started

Documentation

Development

Copy the phpunit.xml file for your local configuration:

Contribution

To test with mysql database:

mysql -uroot -p
CREATE DATABASE sqlbuilder CHARSET utf8;
GRANT ALL PRIVILEGES ON sqlbuilder.* TO 'testing'@'localhost' identified by '';

--- or use this to remove password for testing account
SET PASSWORD FOR testing@localhost=PASSWORD('');

To test with pgsql database:

sudo -u postgres createdb sqlbuilder

Reference

Author

Yo-An Lin (c9s) [email protected]


All versions of sqlbuilder with dependencies

PHP Build Version
Package Version
No informations.
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 c9s/sqlbuilder contains the following files

Loading the files please wait ....