Learn how to access and manipulate databases using the object-oriented PHP extensions PDO and MySQLi.
- [Voiceover] Welcome to this course on Accessing Databases with Object-Oriented PHP. I'm David Powers. We begin with PHP data objects, PDO. PDO produces database neutral code that works with more than a dozen database systems including MySQL, Microsoft SQL Server, PostgreSQL, and SQLlite. Then we'll examine the object-oriented interface of MySQL Improved, which is dedicated to MySQL. You'll not only see how to perform basic select, insert, update, and delete operations, but also how to improve security with prepared statements and to use transactions to execute a series of queries as a single unit that commits changes only if all parts succeed.
We'll also look at some advanced topics such as instantiating custom objects with values drawn from a database. Without more ado, let's start Accessing Databases with Object-Oriented PHP.
Author
Released
7/7/2014- Connecting to a database with PDO or MySQLi
- Fetching a result set
- Executing simple non-SELECT queries
- Sanitizing user input
- Binding input and output values
- Passing an array of values to the execute() method
- Working with advanced PDO fetch methods
- Executing a MySQLi transaction
- Freeing resources that are no longer needed
- Submitting multiple queries
- Creating an instance of a class from a result set
Skill Level Intermediate
Duration
Views
Related Courses
-
Advanced PHP: Debugging Techniques
with Jon Peck1h 29m Intermediate
-
Introduction
-
Welcome1m
-
Using the exercise files4m 56s
-
Setting SQLite permissions1m 11s
-
-
1. Why Use Object-Oriented PHP to Access a Database?
-
Using prepared statements4m 24s
-
Using transactions1m 43s
-
2. PHP Data Object (PDO) Basics
-
Fetching a result set8m 3s
-
Getting error messages7m 17s
-
3. PDO-Prepared Statements and Transactions
-
Using named parameters9m 51s
-
Binding results to variables7m 53s
-
Executing a transaction6m 54s
-
4. Advanced PDO Fetch Methods
-
Reusing a result set7m 53s
-
5. MySQL Improved Basics
-
Setting the character set1m 57s
-
Fetching the result7m 35s
-
Handling non-SELECT queries5m 27s
-
Getting error messages5m 47s
-
6. MySQLi Prepared Statements and Transactions
-
Binding output variables5m 6s
-
7. Diving Deeper into MySQLi
-
Using real_query()6m 1s
-
Submitting multiple queries6m 41s
-
Conclusion
-
PDO and MySQLi compared3m 31s
-
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.
CancelTake notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.
Share this video
Embed this video
Video: Welcome