PDO database connection in PHP

It's only fair to share...Share on Facebook0Share on Google+0Tweet about this on Twitter0Share on LinkedIn0Pin on Pinterest0Digg thisShare on StumbleUpon1

PDOAs we all PHP guys know that MySQL is deprecated in PHP 5.5 and we have to use new extensions like MyQLi or PDO (PHP Data Objects) for database integration,In this article we will explain you how to PDO connection for MySQL database. This article is basically for PDO Beginners. We explain few basic things like database connection, insert records, delete records, update records and select rows with prepare statement.

PDO Database Connection:

 PDO Database Connection With Error Handling:

 Query Using PDO:

 Execute Using PDO:

Insert record Using PDO:

Update record Using PDO:

 Delete record using PDO:


Tags:, ,


  1. By Steve


Leave a Reply

Your email address will not be published. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">