PHP Solutions pp 299-336 | Cite as

Connecting to a Database with PHP and SQL

  • David Powers


PHP offers three different ways to connect to and interact with a MySQL database: the original MySQL extension, MySQL Improved (MySQLi), or PHP Data Objects (PDO). Which one you choose is an important decision, because they use incompatible code. You can’t mix them in the same script. The original MySQL extension was deprecated in PHP 5.5 and will be removed at some unspecified date in the future. It’s not covered in this book.


Error Message Conditional Statement Prepared Statement Floating Point Number Sort Order 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Copyright information

© David Powers 2014

Authors and Affiliations

  • David Powers
    • 1
  1. 1.LondonUnited Kingdom

Personalised recommendations