Download the PHP package delight-im/db without Composer

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

PHP-DB

Safe and convenient SQL database access in a driver-agnostic way

Features

Requirements

Installation

  1. Include the library via Composer [?]:

  2. Include the Composer autoloader:

Usage

Connecting to a database

Available drivers for database systems

Selecting data

When selecting data, you get the desired results with just one method call. And, of course, you can easily choose whether you want to get multiple rows, a single row, a single value only, or a single column from all rows.

Inserting data

For simple insertions, you can use a convenient shorthand:

Does your table have automatically generated primary IDs? Access to these inserted IDs is available with another short method call. The sequence name is only required for some database drivers, e.g. PostgreSQL.

If you need to execute more advanced statements, please refer to section "Executing statements" below.

Updating data

For simple updates, you can use a convenient shorthand as well:

Do you want to know how many rows have been updated by this operation? Just grab the return value from the update method call.

If you need to execute more advanced statements, please refer to section "Executing statements" below.

Deleting data

Again, for simple deletions, you can use a convenient shorthand:

The return value from the delete method call will tell you how many rows have been deleted by this operation.

If you need to execute more advanced statements, please refer to section "Executing statements" below.

Executing statements

You can execute any arbitrary SQL statements as shown in the following examples:

For every statement that you execute, the return value will be the number of rows affected.

If the statement that you're executing is an INSERT, you can get the inserted IDs via the getLastInsertId method, again.

Transactions

Transaction controls are as easy as they should be:

Error handling

The methods from this library do not return any error codes. You will be informed about any problem via an exception.

Input escaping

There's no need for you to escape any input manually. Just use the methods as shown above by using placeholders and passing the data separately. All input will be escaped for you automatically.

Performance profiling

In order to monitor query performance during development, you can enable performance profiling:

Whenever you want to see the analyzed queries or store them in a log file, you can get all measurements recorded by the profiler as an array:

Typically, you'll want to sort the measurements before retrieving them, so that the longest-running queries are listed first:

Server and client information

In order to retrieve some information about the database server that you're connected to or about the database client used by PHP, you can use one of the following methods:

Listeners

Connection established

Contributing

All contributions are welcome! If you wish to contribute, please create an issue first so that your feature, problem or question can be discussed.

License

This project is licensed under the terms of the MIT License.


All versions of db with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6.0
ext-pdo 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 delight-im/db contains the following files

Loading the files please wait ....