Mysqli's features you probably would like to know about

  1. Comments

In the recent years mysqli gained rather a bad reputation, to which I contributed myself. However, mysqli greatly evolved over time and became much more programmer-friendly nowadays. Needless to say that it is still a robust, well-maintained extension which supports all the options provided by the original Mysql C API.

Being overshadowed by both old mysql ext (which had a very limited functionality) and PDO (which is often chosen as a substitution), mysqli remains in obscurity as people seldom volunteer to explore its facilities. So here is the list of options you would probably like to know about which are either make mysqli on par with PDO or even provide some unique functionality:

Now, I would say the only two features are lacking: named placeholders and a prepared-statement-in-one-go function, similar to postgres' pg_query_params(). And although the former is hardly possible, the latter can be easily implemented as a userland helper function, making prepared queries as simple and concise as regular ones.


Related articles: