Im sure most of the php developers here knows how to use mysql or mysqli now my question is
Which is better? Mysql or Mysqli? And why?
please answer me guys.

Recommended Answers

The mysql extension provides a procedural interface and is intended for use only with MySQL versions older than 4.1.3. This extension can be used with versions of MySQL 4.1.3 or newer, but not all of the latest MySQL server features will be available.

Note:
If you are using MySQL versions …

Jump to Post

All 3 Replies

The mysql extension provides a procedural interface and is intended for use only with MySQL versions older than 4.1.3. This extension can be used with versions of MySQL 4.1.3 or newer, but not all of the latest MySQL server features will be available.

Note:
If you are using MySQL versions 4.1.3 or later it is strongly recommended that you use the mysqli extension instead.

Taken from:
http://php.net/manual/en/mysqli.overview.php

Member Avatar

I found Mysqli better from an OOP point of view. However I found the encapsulation a complete pain when using the object in ajax functions. My problem (procedural coder background) not a prtoblem with mysqli.

I see... so the MYSQLi is better for OOP. well thanks.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.