MyPage is a personalized page based on your interests.The page is customized to help you to find content that matters you the most.


I'm not curious

Integrating PHP with Databases

Course Summary

Building a PHP-driven page is the first step in mastering PHP. The true power of PHP shines when you connect it to a data source like an API or a Database. To introduce you to databases, we'll use an example project -- a Personal Media Library application. We'll refactor this project by replacing an associative array with a database to provide a more robust and scalable tool to store the data in the media library. In the process, you'll learn how to use PDO -- a PHP extension to communicate with a database. You'll also learn about relational databases including how to search for data across multiple tables, as well as how to add common web site features like search forms and pagination.


  • +

    Course Syllabus

    Databases and PHP

    Building a php-driven page is just the first step in mastering PHP. The true power of PHP shines when you connect it to a data source like an API or a Database. In this course, we’ll refactor an existing project to use a database. We’ll then leverage the use of this database for pagination and search capabilities. 8 steps
    • Getting to Know the Project 6:35
    • Introducing Objects 3:45
    • Working with Objects 5 questions
    • Getting Started with PDO 4:13
    • PHP & Databases with PDO 1 objective
    • Handling Exceptions 4:23
    • More Exceptions 4:57
    • Exception Handling 5 questions

    Querying the Database with PHP

    After the connecting to a database, we can use that database to retrieve the data for our project. We’ll see how to run a select, retrieve the results, and integrate those results into our site. 8 steps

    Using Relational Tables

    A relational database can offer you robust and easy interaction with your data. It is built on the relationships between the data. When we are on our details page we need to pull many more details about the specific item, including information from other tables. To do this we’re going to use the relationships in our database to JOIN data from multiple tables. We’ll also use our PHP Data Object to address security concerns. 11 steps

    Limiting Records in SQL

    We will modify our functions to use their own SQL queries to retrieve only the items we need in the first place. As we do this, we'll look at a number of different ways to use SQL-specific features like limits, ordering and aggregate functions to fine tune our queries 13 steps

    Filtering Input for Queries

    We’re ready to add one of the most important features of any collection. Search capabilities! This is such an important feature, I want to add a search box to every page. Thankfully that’s easy to do because we already have a header file that’s included on all the pages so we can add a search box right below our header bar. Then we’ll make some modification to our catalog page so we can use that same code to display results. 8 steps


Course Fee:
USD 25

Course Type:

Self-Study

Course Status:

Active

Workload:

1 - 4 hours / week

Attended this course?

Back to Top

 
Awards & Accolades for MyTechLogy
Winner of
REDHERRING
Top 100 Asia
Finalist at SiTF Awards 2014 under the category Best Social & Community Product
Finalist at HR Vendor of the Year 2015 Awards under the category Best Learning Management System
Finalist at HR Vendor of the Year 2015 Awards under the category Best Talent Management Software
Hidden Image Url