Download the PHP package falseclock/dbd-php without Composer

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

PostgreSQL Database driver for PHP

PHP Coverage Status PHP Version Require

Why not standard PDO?

Actually, development of this library was started before PHP 5.0. Being mostly Perl developer and inspired by DBI::DBD library I tried to develop the same functionality for PHP.

Basic feature list:

Getting instance

Very and very easy:

Basic methods

connect — initiate connection to a database

Description

connect() opens a connection to a database using Option instance provided in construction.


do

do — Returns number of affected records (tuples)

Description

do() returns the number of tuples (instances/records/rows) affected by INSERT, UPDATE, and DELETE queries.

Since PostgreSQL 9.0 and above, the server returns the number of SELECTed rows. Older PostgreSQL return 0 for SELECT.

Parameters

statement

The SQL statement to be executed. Can have placeholders. Must contain only a single statement (multiple statements separated by semi-colons are not allowed). If any parameters are used, they are referred to as ?, ?, etc.

params

An array of parameter values to substitute for the ?, ?, etc. placeholders in the original prepared SQL statement string. The number of elements in the array must match the number of placeholders.

Example


query

query — quick statement execution

Description

query() do the same as do() method, but returns self instance.

Parameters

statement

The SQL statement to be executed. Can have placeholders. Must contain only a single statement (multiple statements separated by semi-colons are not allowed). If any parameters are used, they are referred to as ?, ?, etc.

params

An array of parameter values to substitute for the ?, ?, etc. placeholders in the original prepared SQL statement string. The number of elements in the array must match the number of placeholders.

Example


prepare

prepare — creates a prepared statement for later execution with execute() method. This feature allows commands that will be used repeatedly to be parsed and planned just once, rather than each time they are executed.

Description

prepare() returns the new DB driver instance.

Parameters

statement

The SQL statement to be executed. Can have placeholders. Must contain only a single statement (multiple statements separated by semi-colons are not allowed). If any parameters are used, they are referred to as ?, ?, etc.

Example


execute

execute — Sends a request to execute a prepared statement with given parameters, and waits for the result.

Description

execute() executes previously-prepared statement, instead of giving a query string. This feature allows commands that will be used repeatedly to be parsed and planned just once, rather than each time they are executed. The statement must have been prepared previously.

Parameters

params

An array of parameter values to substitute for the ?, ?, etc. placeholders in the original prepared query string. The number of elements in the array must match the number of placeholders.

Example


fetch

fetch — Fetch a column from first row.

Description

fetch() fetch a column from first row without fetching whole row and not reducing result. Calling fetchrow() or fetchrowset() will still return whole result set. Subsequent fetch() invoking will return next column in a row. Useful when you need to get value of column when it is a same in all rows.

Example


fetchrow

fetchRow — fetch a row as an associative array

Description

fetchRow() returns an associative array that corresponds to the fetched row (records).

Return Values

An array indexed associatively (by field name). Each value in the array is represented as a string. Database NULL values are returned as NULL.

FALSE is returned if row exceeds the number of rows in the set, there are no more rows, or on any other error.

Example


fetchrowset

fetchRowSet — fetch a full result as multidimensional array, where each element is an associative array that corresponds to the fetched row.

Description

Parameters

key

A column name to use as an index. If two or more columns will have the same value in a column, only last row will be stored in array.

Return Values

An associative array (in case if key provided) or indexed array if no key was provided. Each value in the array represented as an associative array (by field name). Values in a row Database NULL values are returned as NULL.

Example


insert

insert — makes new row insertion into the table. Returns self instance.

Description

Parameters

table

Database table name

values

An associative array where key is field name and value is a field value.

return

You can define which fields of the table you want return after successful insert

Example 1

Example 2


update

update — makes updates of the rows by giving parameters and prepared values. Returns self instance.

Description

Parameters

table

Database table name

values

An associative array where key is field name and value is a field value.

where

Specifies update condition. Can have placeholders.

args

Binds value for where condition. Strict if placeholders are exist in where parameter. Can be omitted if there are no any placeholders in where parameter.

return

You can define which fields of the table you want return after succesfull insert

Example 1

Example 2

Example 3

Example 4


begin

begin — Starts database transaction

Description

begin() enable transactions (by turning AutoCommit off) until the next call to rollback, AutoCommit will automatically be turned on again.

Example


commit

commit — Commit database transaction

Description

commit() makes permanent the most recent series of database changes if the database supports transactions and AutoCommit is off.


rollback

rollback — undo changes

Description

rollback() undo the most recent series of uncommitted database changes if the database supports transactions and AutoCommit is off.


cache

cache — cache select result

Description

cache() bla bla la


All versions of dbd-php with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
psr/simple-cache Version ^1.0.1
openlss/lib-array2xml Version ^1.0.0
falseclock/dbd-php-entity Version ^3.0.0
ext-json Version *
ext-simplexml Version *
ext-dom 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 falseclock/dbd-php contains the following files

Loading the files please wait ....