Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
PHP connections to MySQL
Rating: 4.4 out of 5(85 ratings)
7,421 students

PHP connections to MySQL

Learn how to connect a MySQL database to your PHP application. Learn MySQLi connection code and Object oriented PHP
Created byLaurence Svekis
Last updated 11/2019
English
English [Auto],

What you'll learn

  • Connection PHP code to MySQL database
  • Create tables, database and run queries using PHP code

Course content

3 sections17 lectures1h 4m total length
  • Introduction to PHP and MySQL connections4:02

    Learn to connect PHP applications to MySQL databases using procedural and object-oriented code, create databases and tables, and perform insert, select, update, and delete queries.

  • PHP Database local environment setup ready to code3:25

    Set up a local PHP development environment with Apache and MySQL using Apache Friends, enabling localhost access and phpMyAdmin to manage databases.

  • Prepare for Database Connection5:20

    Set up a local Apache and MySQL environment, verify phpMyAdmin access, then create a settings file with four DB connection variables (host, user, password, database) for a new database.

  • Setup Connection to Database5:59

    Establish a PHP database connection using mysqli_connect, organize credentials in a settings file, and handle connection errors for reliable database access.

  • Creating a new database4:05

    Create a new database with a setup script, establish a connection, and run a create database query to name it, such as my test.

  • Creating a database table5:23

    Create a table named courses with id as an auto-incrementing primary key and a title column of varchar(255); use phpMyAdmin to run the query and prepare for data insertion.

  • PHP insert in database4:11

    Insert data into the courses table with PHP by setting column values, executing the insert query, and verifying results before preparing for select queries.

  • PHP mySQL select options9:59

    Select all from the courses table, output each row id, title, and lessons to the page, and use where, limit, and order by to refine results, then close the connection.

  • PHP delete from database2:53

    Learn to delete rows from a database using delete from table where id, targeting with a unique id, and test the queries before moving to object oriented connections.

  • Procedural source code0:26

Requirements

  • Basic PHP knowledge
  • have computer and internet access
  • desire to learn about databases connections within PHP

Description

PHP and MySQL together allow you to create amazing applications.  Connecting your code to your database is what this course is all about.  Learn how to add a database connection to your PHP application.  Connecting a database is required by many applications and there are many ways to do this via PHP code.

Please note that this course does not cover the basics of PHP and basic knowledge of PHP is required as part of this course.  It will not be covering PHP coding outside the scope of the course summary.  Setting up your local server is optional and suggestions for a local machine setup and editor option are provided within the course.

This course covers writing PHP code in both procedural and object oriented coding to 

  • Create a database
  • Create a database table
  • Setting up a database connection
  • inserting data into your database
  • Selecting data from your database
  • updating database content
  • deleting data from your database
  • creating queries in phpmyadmin

Source code is included to get you started quickly.  Examples and samples for both coding options.

Everything you need in one place, connect to MySQL its easy and can bring your application to the next level.

Taught by an instructor with over 18 years of PHP development experience.

I'm here to help you learn more about PHP and ready to answer any questions you may have.  Join now and start creating MySQL queries in your PHP code today.


Who this course is for:

  • PHP developers
  • Anyone who wants to learn MYSQLi and Object oriented MySQL connection coding
  • Learn how to add a database connection to PHP applications