Download the PHP package tebe/pdo without Composer

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

PHP Version Require Version Testing tebe\pdo License: MIT

tebe\pdo

Provides an extension to the native PDO along with additional functionality.

tebe\pdo is an extension of the native PDO in the style of a thin wrapper. All constants, properties and methods of the underlying PDO classes are therefore available. Code already using or typehinted to the native PDO can use tebe\pdo with minimal changes for the most part.

Added or changed functionality in tebe\pdo over the native PDO includes:

Examples

Create a PDO instance representing a connection to a database.

Execute an SQL statement without placeholders and return the number of affected rows.

Prepare and execute an SQL statement without placeholders, and fetch all rows from the result set.

Prepare a statement with placeholders for execution, return a statement object, and fetch all columns from the result set.

Run a query with placeholders, return the resulting PDOStatement, and fetch key value array (pairs) from the result set.

Run a query with an IN clause and placeholders, return the resulting PDOStatement, and fetch all rows grouped by color from the result set.

Quote an array for use in a query.

Installation and Autoloading

This package is installable and PSR-4 autoloadable via Composer as tebe/pdo.

Alternatively, download a release, or clone this repository, then include the classes manually:

Dependencies

This package requires PHP 8.1 or later; it has been tested on latest Linux, macOS and Windows on PHP 8.1-8.3. We recommend using the latest available version of PHP as a matter of principle. tebe\pdo doesn't depend on other external packages.

Documentation

tebe\pdo\PDO

The class tebe\pdo\PDO is a wrapper for the native PDO class and implements all methods of this class.

The main differences are that some methods return tebe\pdo\PDOStatement instances and the quote method can also handle arrays.

In addition, the class contains a new method run, which executes a query with bound values and returns the resulting statement instance.

getWrappedPdo

Returns the underlying PDO instance.

prepare

Prepares a statement for execution and returns a statement object.

This differs from PDO::prepare in that it will return a tebe\pdo\PDOStatement object.

See php.net

query

Prepares and executes an SQL statement without placeholders.

This differs from PDO::query in that it will return a tebe\pdo\PDOStatement object.

See php.net

quote

Quotes a string for use in a query.

This differs from PDO::quote in that it will convert an array into a string of comma-separated quoted values.

See php.net

run

Runs a query with bound values and returns the resulting tebe\pdo\PDOStatement.

Array values will be processed by the parser instance and placeholders are replaced.


The remaining tebe\pdo\PDO methods are simple wrapper methods of the underlying PDO class. For more information, see php.net.

tebe\pdo\PDOStatement

The class tebe\pdo\PDOStatement is a wrapper for the native PDOStatement class and implements all methods of this class.

The main difference is that the execute method returns a statement instance. This was done to allow method chaining aka fluent interface.

Besides that it contains several new fetch*() and fetchAll*() methodes for commonly-used fetch actions.

__construct

Creates a tebe\pdo\PDOStatement instance representing a query statement and wraps the original PDOStatement.

execute

Executes a prepared statement

This differs from PDOStatement::execute in that it will return a tebe\pdo\PDOStatement object.

See php.net

fetchAffected

Fetches the number of affected rows from the result set.

fetchAssoc

Fetches the next row from the result set as an associative array.

fetchBoth

Fetches the next row from the result set as an associative and indexed array.

fetchInto

Fetches the next row from the result as the updated passed object, by mapping the columns to named properties of the object.

fetchNamed

Fetches the next row from the result set as an associative array; If the result set contains multiple columns with the same name, an array of values per column name is returned.

fetchNumeric

Fetches the next row from the result set as an indexed array.

fetchPair

Fetches the next row from the result set as a key-value pair.

fetchAllAssoc

Fetches all rows from the result set as an array of associative arrays.

fetchAllBoth

Fetches all rows from the result set as an array of associative and indexed arrays.

fetchAllColumn

Fetches all rows from the result set as an array of a single column.

fetchAllFunction

Fetches all rows from the result set as an array by calling a function for each row.

fetchAllGroup

Fetches all rows from the result set as an array by grouping all rows by a single column.

fetchAllNamed

Fetches all rows from the result set as an array of associative arrays; If the result set contains multiple columns with the same name, an array of values per column name is returned.

fetchAllNumeric

Fetches all rows from the result set as an array of indexed arrays.

fetchAllObject

Fetches all rows from the result set as an array of objects of the requested class, mapping the columns to named properties in the class.

fetchAllPair

Fetches all rows from the result set as an array of key-value pairs.

fetchAllUnique

Fetches all rows from the result set as an array of arrays, indexed by an unique field.


The remaining tebe\pdo\PDOStatement methods are simple wrapper methods of the underlying PDOStatement class. For more information, see php.net.

tebe\pdo\PDOParser

Class tebe\pdo\PDOParser offers parsing and rebuilding functions for all drivers.

__construct

Creates a tebe\pdo\PDOParser instance.

rebuild

Rebuilds a statement with placeholders and bound values.

Quality

Testing tebe\pdo

This project adheres to Semantic Versioning.

To run the functional tests at the command line, issue composer install and then composer test at the package root. (This requires Composer to be available as composer.)

This package attempts to comply with PSR-1, PSR-4, and PSR-12. If you notice compliance oversights, please send a patch via pull request.


All versions of pdo with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
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 tebe/pdo contains the following files

Loading the files please wait ....