<commit_before>
# Old mysql functions compatibility for PHP5.6 and PHP7

[![Build Status](https://travis-ci.org/mattbit/mysql-compat.svg?branch=master)](https://travis-ci.org/mattbit/mysql-compat)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/mattbit/mysql-compat/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/mattbit/mysql-compat/?branch=master)

This library tries to provide backward compatibility with the deprecated `mysql_*` functions.

## Caveat

You really should not use this unless strictly needed: it's much better to refactor the existing code to use `PDO` and prepared statements directly or an ORM like [Eloquent](https://github.com/illuminate/database).

Although library provides an hackish replacement for `mysql_real_escape_string`, you ought to refactor your code to use prepared statements.

## Requirements

`PHP >= 5.6` with the `PDO` driver is required (`PHP 7` is supported).

## To do

- [X] `mysql_​affected_​rows`
- [ ] `mysql_​client_​encoding`
- [X] `mysql_​close`
- [X] `mysql_​connect`
- [ ] `mysql_​create_​db`
- [X] ~~mysql_​data_​seek~~ (not supported)
- [ ] `mysql_​db_​name`
- [ ] `mysql_​db_​query`
- [ ] `mysql_​drop_​db`
- [X] `mysql_​errno`
- [X] `mysql_​error`
- [X] `mysql_​escape_​string`
- [X] `mysql_​fetch_​array`
- [X] `mysql_​fetch_​assoc`
- [X] `mysql_​fetch_​field`
- [X] `mysql_​fetch_​lengths`<commit_msg>Add sensiolabs badge<commit_after>
# Old mysql functions compatibility for PHP5.6 and PHP7

[![Build Status](https://travis-ci.org/mattbit/mysql-compat.svg?branch=master)](https://travis-ci.org/mattbit/mysql-compat)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/mattbit/mysql-compat/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/mattbit/mysql-compat/?branch=master)
[![SensioLabsInsight](https://insight.sensiolabs.com/projects/d9fcd340-4f29-46ac-966a-9df364b87aae/mini.png)](https://insight.sensiolabs.com/projects/d9fcd340-4f29-46ac-966a-9df364b87aae)

This library tries to provide backward compatibility with the deprecated `mysql_*` functions.

## Caveat

You really should not use this unless strictly needed: it's much better to refactor the existing code to use `PDO` and prepared statements directly or an ORM like [Eloquent](https://github.com/illuminate/database).

Although library provides an hackish replacement for `mysql_real_escape_string`, you ought to refactor your code to use prepared statements.

## Requirements

`PHP >= 5.6` with the `PDO` driver is required (`PHP 7` is supported).

## To do

- [X] `mysql_​affected_​rows`
- [ ] `mysql_​client_​encoding`
- [X] `mysql_​close`
- [X] `mysql_​connect`
- [ ] `mysql_​create_​db`
- [X] ~~mysql_​data_​seek~~ (not supported)
- [ ] `mysql_​db_​name`
- [ ] `mysql_​db_​query`
- [ ] `mysql_​drop_​db`
- [X] `mysql_​errno`
- [X] `mysql_​error`
- [X] `mysql_​escape_​string`
- [X] `mysql_​fetch_​array`
- [X] `mysql_​fetch_​assoc`
- [X] `mysql_​fetch_​field`
- [X] `mysql_​fetch_​lengths`
{'fraction_non_alphanumeric': 0.16055200269269607, 'fraction_numerical': 0.016156176371592057, 'mean_word_length': 5.377682403433476, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 12, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7403623', 'n_tokens_mistral': 1138, 'n_tokens_neox': 1093, 'n_words': 238}