Mysqli class support
Replaced ternary operator with standard if.
Merge pull request #50 from ivanp/master

Mysqli class support