Download the PHP package leonid-slv/mysql2pdo without Composer

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

Old mysql methods using PDO

The package provides global mysql_* functions old model (PHP older 5.5) that can be used when the original MySQL extension is not available.

The librarie duplicates all popular of the functionality of mysql_* functions. Very high speed efficiency, almost 100% compared to direct use of PDO or mysqli.

It is important to note that there is support for encryption SSL certificate.

PHP 7 mysql_connect
PHP 7 mysql_select_db
PHP 7 mysql_real_escape_string
PHP 7 mysql_query
PHP 7 mysql_result
PHP 7 mysql_insert_id
PHP 7 mysql_fetch_array
PHP 7 mysql_fetch_assoc
PHP 7 mysql_fetch_row
PHP 7 mysql_num_rows
PHP 7 mysql_set_charset
PHP 7 mysql_error
PHP 7 mysql_errno
PHP 7 mysql_free_result
PHP 7 mysql_close

Lost connection:

In most cases, everything is fine! But it happens when the settings of the PDO driver are strange, for example, this was found in the cloud Yandex Function. To avoid this, just at the end of the code, insert

//Close all connections for fast restart
mysql_close();

Examples:

Classic connection:

//Connect and print date
$link = mysql_connect($host, $user, $password);
if ($link == false) { exit(); };
mysql_select_db($db,$link);
mysql_query('SET NAMES "utf8"');
echo (mysql_result(mysql_query('SELECT NOW();'),0,0));

SSL connection:

//SSL connect and print date
$link = mysql_connect($host, $user, $password, 'yandex.crt');
if ($link == false) { exit(); };
mysql_select_db($db,$link);
mysql_query('SET NAMES "utf8"');
echo (mysql_result(mysql_query('SELECT NOW();'),0,0));

Examples:

$result = mysql_query('SELECT `PAYMENTS`.`ID`, `PAYMENTS`.`DATE`, `PAYMENTS`.`CONTRACT`, `PAYMENTS`.`SUM`, `PAYMENTS`.`OPERATOR`, `PAYMENTS`.`COMMENT`, `PAYMENTS`.`DELETED`, `USERS`.`GROUP` FROM `PAYMENTS`,`USERS` WHERE `USERS`.`CONTRACT`=`PAYMENTS`.`CONTRACT` AND `PAYMENTS`.`ID_MANAGER`="'.$id_manager.'"'.$payments_search.' ORDER BY `DATE` DESC LIMIT '.$payments_count.';');
for ($i=0; $i<mysql_num_rows($result); $i++)
  {
    echo '<td><u>'.mysql_result($result, $i, 0).'</u></td>';
    echo '<td><u>'.mysql_result($result, $i, "PAYMENTS.CONTRACT").'</u></td>';
  }

Who is this for?

This package is for site owners/developers who want to upgrade their PHP version to a version that has the mysqlconnect/mysql* functions removed without having to re-write their entire codebase to replace those functions to PDO or MySQLI.

About:

If you run into any issues, bugs, features or make things better please send them to me and I will get them in as soon as I can.

@authors   Selvistrovich Leonid <[email protected]>, Jaroslav Herber
@copyright GPL license
@license   http://www.gnu.org/copyleft/gpl.html
@link      https://github.com/Leonid-SLV/

Versions:

Current Version

Version 1.3

Version 1.1


All versions of mysql2pdo with dependencies

PHP Build Version
Package Version
No informations.
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 leonid-slv/mysql2pdo contains the following files

Loading the files please wait ....