Download the PHP package naga3/qb without Composer

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

Qb: Simple query builder

Japanese README

This was assumed per the provision of the back-end API, a simple PDO query builder. I was created in mind is that the write as short as possible the code.

Just only this you can return a list of the contact table in JSON.

Audiences

Though it is to use the raw PDO as it is troublesome, who full-fledged DB library feels overkill function.

Resources

doc/index.html is a reference.

How to install

only require 'qb.php'.

If you use the Composer is,

Install Now you read in the autoload.

Samples

sample/contact.php is a sample of a simple contact list. sample/todo.php is a sample of the ToDo list that combines AngularJS. Both samples PDO_SQLITE module is I will work as it is if it is introduced.

API

Connection

Connect to the specified DSN.

SELECT

It will return a list of the contact table in JSON.

It will return the name column and tel column of the table contact list in the array.

name column of the table contact list I returned unchanged. And tel column will return as an object with an alias t.

WHERE

id column of contact table will return one line of 1.

There is also such shorthand.

In status column of the contact table is 1 or more, it will return the ones that contain "Yamada" in the name.

JOIN

INNER JOIN. 'access.contact_id = contact.id' is binding conditions.

LEFT OUTER JOIN.

INSERT

to contact table name column is "Ichiro Suzuki", insert the record age column is "19". The return value is the value of the primary key.

INSERT or UPDATE

In an attempt to first UPDATE If there is a WHERE clause to INSERT if there is no record of the target.

UPDATE

Here even if there is no record of the target will not be INSERT.

1 column only change you can also be written as this.

SET

INSERT and from connecting the chain set, you can UPDATE.

DELETE

age column of contact table will remove all 20 of the record.

id column of contact table will delete a record.

ORDER BY

It will return a list of the contact table in ascending order of created_at column.

It will return a list of the contact table in descending order of created_at column, in ascending order of id.

OFFSET, LIMIT

You get 5 from 10 th in the list of contact table.

PDO object acquisition

You get the raw PDO object. Please, for example, when you put the transaction.

Option when connecting

important point


All versions of qb 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 naga3/qb contains the following files

Loading the files please wait ....