I'm reading up on php db classes and everything i'm reading recommends "PDO". Cool. So what then is the purpose of "mysqli_stmt"? Is is deprecated?
Please advise.
sleeper.
I'm reading up on php db classes and everything i'm reading recommends "PDO". Cool. So what then is the purpose of "mysqli_stmt"? Is is deprecated?
Please advise.
sleeper.
There is more than one way to do things. PDO is a database layer that allows you to use many different database types via various drivers. mysqli_*
is only for MySQL.
Both will get the job done when using a MySQL database. I recommend PDO, but that is just my preference, as I like the flexability of possibly changing databases more easily in the future.
Mysqli is said to be the faster performance wise of the two, however the features of PDO far outweigh those of Mysqli in my opinion. I also prefer the flexibility of PDO when changing databases.
PDO
is an abstraction layer, mysqli
is an extension that interacts directly with the database.