Posted by : Rhyf Ahmad Friday, May 22, 2015

Virtually every serious Web application you'll build will use some sort of data - storage mechanism. Such data storage is typically used to store application settings, user registrations, dynamic content — more or less anything in your application that will be dynamic (that is, it could change at some stage, either as a result of something one of your users does or as a result of a change in the business that owns the application).

For all but the very smallest applications, the accepted choice for data storage tends to be a relational database management system (RDBMS). The benefits are clear: scalability, ease of interrogation, reliability, resilience, integrity of data — the list goes on. It's also a virtual necessity should you ever desire something other than PHP to get its hands on your data.
By using a platform - agnostic container for your data, you're not limiting yourself artificially should you, for example, ever determine that a .NET application might need to use that data, too. Indeed, so prolific is the combination of “ PHP - and - a - database ” that virtually all beginners’ books introduce the MySQL database in the very first chapter. The acronym LAMP (Linux, Apache, MySQL, and PHP) has cropped up in recent years — and searching Google for the phrase “ PHP and MySQL ” yields more than 2 million hits. Unfortunately, as with so much in PHP, the way most people learn to work with databases in their early years of PHP education is rarely considered best practice. Building applications that are scalable, extensible, easy to port, and easy to maintain requires a different approach.
In this chapter, you'll learn just that. You'll start off with a recap of PHP's database support, as well as remind yourself how database connectivity has been handled in PHP since its introduction many years ago. By considering hypothetical examples, you'll learn about the limitations of this approach. Then, you'll meet PHP Data Objects (PDO) and learn how PDO can provide a more enterprise - ready approach.

Contents:

PHP and Databases
  1. PHP’s Database Support
  2. PHP and PostgreSQL
  3. Recap
  4. The Problem
  5. Wrapper Classes
  6. Summing Up

Database Abstraction
  1. What’s Needed
  2. Introducing PDO
  3. Getting Started with PDO

Working with PDO
  1. The PDO Class
  2. Executing Queries
  3. The PDOStatement Class
  4. Prepared Statements
  5. Write-Only Statements
  6. Transactions and Committals
  7. Constants
  8. Handling Errors

Advanced PDO Techniques
  1. Large Objects
  2. Database-Specific Functions
  3. Persistent Connections
  4. Stored Procedures
  5. Singleton Instantiation

Limitations of PDO
  1. Query Syntax
  2. Feature Emulation
  3. Non-SQL Data Sources
  4. Beyond PDO



Ebook Preview

If the link above doesn't work, try the link below

Leave a Reply

You can leave a comment to request any article(s), software(s), ebook(s) or report the dead link.
Then I will reply as soon as I can :)

Subscribe to Posts | Subscribe to Comments

Welcome to My Blog

Recent Post

Recent Posts Widget
Instagram

- Copyright © Madriva -Robotic Notes- Powered by Blogger - Designed by Johanes Djogan -