<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta name="viewport" content="width=device-width,
      initial-scale=1.0">
  </head>
  <body style="-ms-text-size-adjust: 100%; -webkit-text-size-adjust:
    100%; margin: 0; padding: 0; width: 100% !important"
    bgcolor="#FFFFFF" text="#000000">
    <style type="text/css">
body {
width: 100% !important; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; margin: 0; padding: 0;
}
.ExternalClass {
width: 100%;
}
.ExternalClass {
line-height: 100%;
}
#backgroundTable {
margin: 0; padding: 0; width: 600px !important; line-height: 100% !important;
}
img {
outline: none; text-decoration: none; -ms-interpolation-mode: bicubic;
}
h1 a:active {
color: red !important;
}
h2 a:active {
color: red !important;
}
h3 a:active {
color: red !important;
}
h4 a:active {
color: red !important;
}
h5 a:active {
color: red !important;
}
h6 a:active {
color: red !important;
}
h1 a:visited {
color: purple !important;
}
h2 a:visited {
color: purple !important;
}
h3 a:visited {
color: purple !important;
}
h4 a:visited {
color: purple !important;
}
h5 a:visited {
color: purple !important;
}
h6 a:visited {
color: purple !important;
}
</style>
    <div id="main-content" style="color: #222222; font-family:
      'Helvetica', 'Arial', sans-serif; font-size: 14px; line-height:
      1.4; padding: 25px; width: 550px">Yesterday you learned <strong
        style="font-weight: bold"><span style="line-height: 1.6">Modernizing
          your codebase</span></strong>. Today we're going to dive into
      <strong style="font-weight: bold">Modernizing your database
        handling</strong>.<br>
      <br>
      Are you still writing plain sql statements and running them with
      mysql_query ? If so, your codebase must have been hacked before. I
      would be surprised if it hasn't. No? Tell us your URL, we will
      delete your data right away. That is how easy it is to hack a
      MySQL extension powered PHP application.<br>
      <br>
      Jokes aside, the truth is that the PHP MySQL extension is
      depreciated, you should avoid it at all costs.<br>
      <br>
      Currently two main extensions in PHP for dealing with databases.
      One is MySQLi (MySQL improved) and the other is PDO (PHP Data
      Objects). These extensions are similar in that they both support
      almost all the database operations, such as insert, delete,
      update, database transaction, real escape string and so on.<br>
      <br>
      However we recommend using PDO to build your applications due to
      the following two reasons:
      <ul>
        <li> It enables developers to write portable code. </li>
        <li>It encourages object-oriented programming.</li>
      </ul>
      PDO is built with database drivers besides MySQL. Currently it
      supports more than ten databases including MS SQL, Oracle,
      PostgreSQL, SQLite and so on. This is really powerful, because we
      can write our code once and let it run on different types of
      database engines. We do not need to change even a single line of
      code.<br>
      <br>
      Object-oriented programming (OOP) also plays a big part in our
      decision to choose a database access library. At the end of the
      day, we want our codebase to be easy to change, and we believe
      that OOP allows us to do that. Time to pick up PDO and have your
      next project run safely.<br>
       
      <div>Now that you understand the importance of using PDO,
        tomorrow's installment will dive into <span style="line-height:
          1.6"><strong style="font-weight: bold">Error handling</strong>.</span><br>
        <br>
        Until then,</div>
      <div> </div>
      <div>Keep learning!<br>
        Xu<br>
        <a class="moz-txt-link-abbreviated" href="http://www.startutorial.com">www.startutorial.com</a></div>
    </div>
    <div id="footer" style="border-top-color: #d0d0d0; border-top-style:
      solid; border-top-width: 1px; color: #777; font-family:
      'Helvetica', 'Arial', sans-serif; font-size: 13px; line-height:
      1.4; padding: 25px; width: 550px">Kindest regards:<br>
      Istvan Holbok<br>
    </div>
    <img src="cid:part1.BBC92E60.FDC86A20@gmail.com" alt=""
      style="height:1px !important;width:1px !important;border-width:0
      !important;margin-top:0 !important;margin-bottom:0
      !important;margin-right:0 !important;margin-left:0
      !important;padding-top:0 !important;padding-bottom:0
      !important;padding-right:0 !important;padding-left:0 !important;"
      height="1" border="0" width="1">
  </body>
</html>