Download the PHP package geeklab/glpdo2 without Composer

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

License: BSD phpstan enabled Build Status Scrutinizer Code Quality Code Coverage

GeekLab\GLPDO2

Easy to use PDO Wrapper for PHP >= 8.1

Latest

2022-11-25 (4.0.9)

Features

Installation

composer require geeklab/glpdo2

Todo

Basic Usage (Quick-N-Dirty)

Data Binding Methods

Statement->bBool($value, optional boolean $null)
Binds a value as bool(true, false), with optional NULL value return.

Statement->bBoolInt($value, optional boolean $null)
Binds a value as int(0, 1), with optional NULL value return.

Statement->bDate($value, optional boolean $null)
Binds a value as a date (string - validated for YYYY-MM-DD), with optional NULL return.

Statement->bDateTime($value, optional boolean $null)
Binds a value as a date time (string - validated for YYYY-MM-DD HH:MM:SS), with optional NULL return.

Statement->bFloat($value, optional integer $decimals, optional boolean $null)
Binds a value aa a float, with decimal place (default of 3) and optional NULL return. Use '%%' instead of '?'.

Statement->bInt($value, optional boolean $null)
Bind a value as an integer, whith optional NULL return.

Statement->bIntArray(array $data, integer $default)
Converts an array of integers to a comma separated values. Will output $default (which is 0) if $data is not an array. Used with IN() statements. Use '%%' instead of '?'.

Statement->bJSON($data, optional boolean $null)
Binds a JSON object or string as a string, with optional NULL value. Throws JsonException.

Statement->bLike($value, boolean $ends, boolean $starts)
Binds a value as a string for LIKE queries. $ends = "ends with", $starts = "starts with"

Statement->bStr($value, optional boolean $null, optional \PDO::PARAM_* $type)
Binds a value as a string, with optional NULL value return and optional PDO binding type (default \PDO::PARAM_STR).

Statement->bStrArr(array $values, optional string $default)
Binds a string converted array for use with IN statements. $default is used when value isn't an array, which the default is NULL. Use '%%' instead of '?'.

Statement->bind($name, $value, \PDO::PARAM_* $type)
Binds a value to a named parameter with option PDO binding type (default \PDO::PARAM_STR)

Statement->bRaw($value)
Binds a raw value to '%%' in the sql statement. This is unquoted and unescaped. Good for tables names and functions. Can be dangerous if not handled correctly.

Query Methods

GLPDO->queryDelete(Statement $SQL)
Runs a delete query and returns numbers of affected rows.

GLPDO->queryInsert(Statement $SQL)
Runs an insert query and returns the primary ID.

GLPDO->queryUpdate(Statement $SQL)
Runs an update query and returns number of affect rows

GLPDO->selectRows(Statement $SQL)
Run a normal query, returns multiple rows as an array of associative arrays, or false.

GLPDO->selectRow(Statement $SQL)
Runs a normal query, returns a single row as an array, or false.

GLPDO->selectValue(Statement $SQL, $column, $default)
Runs a normal query, returns a single column ($column) and can return a default (mixed $default = null) value is no value is in the column.

GLPDO->selectRow(Statement $SQL)
Runs a normal query, returns a single row as an array.

GLPDO->beginTransaction()
Begins an SQL Transaction.

GLPDO->commit()
Commits an SQL Transaction.

GLPDO->inTransaction()
Is there a transaction in progress, returns bool.

Misc Methods

Statement->sql(string $text)
Used to build up the SQL parameterized statement.

Statement->reset()
Used to reset Statement private variables. Usefully for creating multiple queries without having to create a new Statement object.

Statement->execute(\PDO $PDO)
Prepares and executes the statement

Statement->getComputed()
Returns what the compiled SQL query string might look like for debugging purposes.

Alternative Packages


All versions of glpdo2 with dependencies

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

Loading the files please wait ....