title: PHP: mysql v mysqli v pdo
body: <p>I've been reading some questions regarding using mysqli versus pdo to use mysql in php. </p>
  
  <p>I've seen questions such as <a href="https://stackoverflow.com/questions/13569/mysqli-or-pdo-what-are-the-pros-and-cons">mysqli or PDO - what are the pros and cons?</a> or <a href="https://stackoverflow.com/questions/770782/moving-from-mysql-to-mysqli-or-pdo?lq=1">Moving from mysql to mysqli or pdo?</a>, which both deal with mysqli v pdo exclusively. I'm not as much interested as to which of these two methods are better.</p>
  
  <p>I was wondering why mysql_ functions should be avoided. Of course, they're in the process of being deprecated per PHP's documentation <a href="http://php.net/manual/en/faq.databases.php#faq.databases.mysql.deprecated" rel="nofollow noreferrer">http://php.net/manual/en/faq.databases.php#faq.databases.mysql.deprecated</a>, the thread <a href="https://stackoverflow.com/questions/10703426/php-pdo-and-mysqli">PHP PDO and MySQLi</a>  suggests PDO and MySQLi are more poweful, and the thread <a href="https://stackoverflow.com/questions/2190737/what-is-difference-between-mysql-mysqli-and-pdo">What is the difference between MySQL, MySQLi and PDO?</a> implies that these newer methods are more secure.</p>
  
  <p>Overall, I'm wondering what are the big weaknesses in the mysql_ methods, and what reasons there are for avoiding it (I guess more specifically than just because it's deprecated). I'm planning to update my affected scripts, and became curious as to why this old method was deprecated.</p>
  
  <p>Thanks! </p>