Finalized version 2.0 which works also with PHP mysqli native plugin.