Skip to Content
PHP 7: Real World Application Development
book

PHP 7: Real World Application Development

by Doug Bierer, Altaf Hussain, Branko Ajzele
September 2016
Intermediate to advanced
1091 pages
21h 41m
English
Packt Publishing
Content preview from PHP 7: Real World Application Development

Chapter 5. Interacting with a Database

In this chapter, we will cover the following topics:

  • Using PDO to connect to a database
  • Building an OOP SQL query builder
  • Handling pagination
  • Defining entities to match database tables
  • Tying entity classes to RDBMS queries
  • Embedding secondary lookups into query results
  • Implementing jQuery DataTables PHP lookups

Introduction

In this chapter, we will cover a series of database connectivity recipes that take advantage of the PHP Data Objects (PDO) extension. Common programming problems such as Structured Query Language (SQL) generation, pagination, and tying objects to database tables, will be addressed. Finally, at the end, we will present code that processes secondary lookups in the form of embedded anonymous functions, ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Pro PHP Programming

Pro PHP Programming

Peter MacIntyre, Brian Danchilla, Mladen Gogala
Learning PHP 7

Learning PHP 7

Antonio L Zapata (GBP)
Intermediate PHP

Intermediate PHP

Lorna Jane Mitchell
Mastering PHP 7

Mastering PHP 7

Branko Ajzele

Publisher Resources

ISBN: 9781787129009