Download the PHP package jaypha/mysqli-ext without Composer

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

Jaypha MySQL Ext

Written by Jason den Dulk

A trait containing convenience functions to extend the functionality of the mysqli class. These functions reflect very common database related tasks, and can help reduce code overhead.

Requirements

PHP v5 or greater.

Installation

MySqliExt

As Trait

Must be added to a child of mysqli.

As Class

API

q($query)

Same as mysqli::query, but throws an exception upon error.

mq($query)

Same as mysqli::multi_query, but throws an exception upon error.

queryValue($query)

Calls q with $query and returns a single value. The first value of the first row.

Returns a string if a value is found and not null, NULL if the value was null, or false if no row was found

queryRow($query, $resultType = MYSQLI_ASSOC)

Calls q with $query and returns the first row.

Returns an array if a row was found. If result type is MYSQLI_ASSOC, it will be an associative array. Returns false if no row was found

queryData($query, $keyField = NULL, $resultType = MYSQLI_ASSOC)

Calls q with $query and returns the whole data set. If $keyField is set, then the values from this column are used as array keys.

Returns an array of rows. Each row is an array. If resultType is MYSQLI_ASSOC, it will be an associative array.

If now rows were found, returns an empty array.

If a key is repeated, it will overwrite any existing value.

queryChunkedData($query, $limit = 1000, $resultType = MYSQLI_ASSOC)

Returns a MySQLiChunkedResult instance.

queryColumn($query)

Calls q with $query and returns a single column. If the SQL query selects one field, then queryColumn returns an array containing the values. If the query selects two or more, then an associative array is returned with the contents of the first column as the keys and the contents of the second columns as the values.

If no rows were found, returns an empty array.

If a key is repeated, it will overwrite any existing value.

insert($tableName, $columns, $values = NULL)

A shortcut for insert statements. There are three cases

Returns the insert ID value.

update($tableName, $values, $wheres)

A shortcut for update statements.

replace($tableName, $values)

A shortcut for replace statements.

insertUpdate($tableName, $values, $wheres)

Will either insert or update. If a row mathcing the given $wheres exists, then it will be updated with the new $values. Otherwise a new row is inserted with the $values and $wheres combined.

Use this instead of replace when you do not want to destory existing rows.

delete($tableName, $wheres = null)

Shortcut for delete. If $where is an integer, then it is matched to an id column.

If $wheres is null, then it will truncate the table.

get($tableName, int $id)

Selects a row where column 'id' is of value $id. A column called 'id' must exist.

set($tableName, $values, int $id = 0)

Updates a table row where column 'id' is of value id. If no id is provided (i.e. a value of zero), performs an insert instead. A column called 'id' must exist.

Returns the row's id.

MySQLiChunkedResult

If, for whetever reason, you cannot have an open query, but you also cannot load the whole query result into memory, then this class works as a compromise. The result is stored into a temporary table, and then read in chunks as separate queries. Implements Iterator so it can be used with foreach.

Usage

License

Copyright (C) 2017 Jaypha.
Distributed under the Boost Software License, Version 1.0.
See http://www.boost.org/LICENSE_1_0.txt


All versions of mysqli-ext with dependencies

PHP Build Version
Package Version
Requires php Version ^5.0 || ^7.0
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 jaypha/mysqli-ext contains the following files

Loading the files please wait ....