fridge-project/dbal — pull request #8 by egeloen (2012-07-22 20:24:12+00:00)
Title: [WIP][Adapter] Add support for mysqli extension

This PR adds support for the [mysqli extension](http://php.net/manual/en/book.mysqli.php).

According to the [documentation](http://www.php.net/manual/en/mysqli.overview.php), it is strongly recommended to use this extension which supports all MySQL 4.1+ functionality.

Unfortunately, mysqli does not support named placholders like PDO does. In order to solve this issue, I have added a `StatementRewriter` which rewrites a named statement to a positional statement and rewrites a named parameter to positional parameters.

I'm not hapy with this naming (StatementRewriter)... Maybe a better idea?

Additionally, `PDO::PARAM_LOB` type is currently mapped to the mysqli `s` type instead of the expected mysqli `b` type. The issue is blob size can exceed the size of max_allowed_packet mysql constant. In this specific case, we should call [send_long_data](http://www.php.net/manual/en/mysqli-stmt.send-long-data.php) function multiple time to send the parts of a character or binary data value.