Download the PHP package docnet/php-dbal without Composer

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

PHP DB Access Layer

Designed to wrap mysqli into a series of fast, secure and easy to use classes.

Install with Composer

Require line as follows

"docnet/php-dbal": "v2.1"

Let's Connect

You're gonna need to connect to a DB before you can do anything else...

For the following examples, we'll assume there's an active DB object.

My First SELECT

After this has executed, $records will be an array of stdClass objects - see how to change the result class later.

SELECT One Record

After this has executed, $record will be a stdClass object.

Result Class

If we pass in an optional third parameter, we'll get back an object of that class

So now, $foo is an instance of class Foo

SELECT with parameters and result Class

After execution, $records is an array of (namespaced) \Docnet\Bar objects, where intKey > 3 and vchName = Barry

The prepare() method returns a fluent Statement class which provides named parameter binding.

Parameter binding deals with all escaping and quoting for you.

INSERT, UPDATE, DELETE

Insert, update and delete operations (also called DML queries) work in just the same way as the fetch methods.

Return Values

Re-executing Prepared Statements

For SELECTs

Or, more commonly, INSERTs - this can be MUCH higher performance than running multiple INSERT queries as the server only interprets the SQL string once.

Arbitrary SQL

If you REALLY need to, you can just run arbitrary queries like this:

Binding

Binding is great. It allows the DBAL to take care of escaping AND quoting.

There are quite a few different supported binding methods (probably too many, but I'm keen to be flexible).

Shorthand, single scalar value

Shorthand array of parameters - parameter sequence must match your query

Shorthand array of named parameters - any sequence, types auto-detected

Long-hand typed, named binding - fluent, any sequence

Long-hand type-hinted, named binding - fluent, any sequence

Public Methods

DB Class

The following methods are available

Statement Class

SELECT

DML

Binding

Post execution


All versions of php-dbal with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
ext-mysqli Version *
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 docnet/php-dbal contains the following files

Loading the files please wait ....