Mysqli or PDO? When should you use which?
There are two main ways to access databases in PHP: mysqli and PDO.
Advantages of mysqli:
Simpler
MySQL-focused
Advantages of PDO:
Multiple DB support
More secure prepared statement
Recommendation:
Old project → mysqli
New project → PDO
Which one do you use and why?