MySQL PHP Tutorial – Select & Display Data From MySQL Tables


Upgrade your Clever Techie learning experience:

UPDATE! (9/13/19) New features and improvements for Clever Techie Patreons:

1. Download full source code with detailed comments – easy to learn and understand code
2. Weekly source code file updates by Clever Techie – every time I learn new things about a topic I will add it to the source file and let you know about the update – keep up with the latest coding technologies
3. Library of custom Clever Techie functions with descriptive, easy to understand comments – skyrocket coding productivity, code more efficiently by using Clever library of custom re-usable functions
4. Syntax code summary – memorize and review previously learned code faster
4. Organized file structure – access all Clever Techie lessons, source code, graphics, diagrams and cheat sheet from a single workspace – no more searching around for previously covered material and source code – save enormous amount of time and effort
5. Outline of topics the source file covers – fast review of all previously learned coding lessons
6. Access to all full HD 1080p videos with no ads
7. Console input examples – interactive examples that make it easier to understand and learn coding
8. Access to updated PHP Programming Book by Clever Techie
9. Early access to Clever Techie videos

Subscribe to Clever Techie patreon:

““““““““““““““““““““““““““““““““““““““““““““““` This MySQL PHP tutorial is suitable for beginners as well as advanced MySQL users. In this lesson we mostly cover selecting data from the tables as well as relational tables and then displaying the data in a nicely formatted HTML with CSS. What’s important to understand when making queries and getting back results from the SELECT statements in MySQL is that we’re working with objects which have their unique properties and methods.

Hey guys, I’m now using Patreon to share improved and updated video lesson material. For a small fee you can access all the downloadable files from this lesson (source code, icons & graphics, cheat sheets) and everything else included in the video from the Patreon page. Additionally, you will get access to ALL Clever Techie videos in HD format with no ads. Thank you so much for supporting Clever Techie 🙂

Download this video’s files here:

This download (Patreon unlock) includes:
(movies database sql dump file, php select & display source code, MySQL workbench table structure diagram, style.css, readme.txt)
( You also get access to ALL source code and any downloadable content of ALL Clever Techie videos, as well as access to ALL videos in HD 1080p quality format with all video ads removed! )


A method called fetch_assoc() for example of MySQL result object, works in a unique way because whenever called it keeps getting the next row result of the SELECT statement query which was previously loaded with the MySQL object query() method. By understanding how objects work and where these methods come from, you will get a clear picture of how to work with MySQL data, so you can select and show everything from the MySQL database that you ever want. You will also get a good understanding of how to display all the data returned from MySQL with PHP and integrate the code into HTML by learning from this MySQL PHP tutorial.

( Website ) – PHP, JavaScript, WordPress, CSS, and HTML tutorials in video and text format with cool looking graphics and diagrams.

( YouTube Channel )

( Google Plus ) – clever techie video tutorials.

( Facebook )

( Twitter )


Xem thêm bài viết khác:


  1. Валерий Мишенин 2 July, 2020 at 14:07 Reply

    cool tutorial! how to create admin panel for this site? for editing content

  2. Emre Çiçek 2 July, 2020 at 14:07 Reply

    while($movie = $result->fetch_assoc()): // wont work when i included that. // this page wont work

  3. Csongor Birizdó 2 July, 2020 at 14:07 Reply

    hi clever techie nice video but I cannot open the links which you have added to the description. When I want to download it, it says: interrupted no file. What can I do?

  4. Neo Custom Media 2 July, 2020 at 14:07 Reply

    Is the execution of the code the same if I am in your LOGIN system? I seem to have to add another string of DB connect

  5. Bitcoin Kings 2 July, 2020 at 14:07 Reply

    Hi, really great tutorial my friend. It really helped me with my project. If its not too much trouble could you please make a tutorial on how to insert data into multiple tables with one form. I want to setup a blog with multiple tables which includes:

    – id
    – title
    – description
    – id
    – title
    – id
    – title
    – cat_id
    – post_cat_id
    – tag_id
    – post_tag_id

    I hope this makes sense but if not then what I want is to display the category and the tags on a blog post and I want it to link to category.php and tags.php respectively. These two page will then display all the posts with the selected <i>category id</i> and <i>tag id</i>.

    I really hope and pray that you can help me with this.
    Kind regards,

  6. marcio Quiteque 2 July, 2020 at 14:07 Reply

    i havn't started watching yet but it looks SICCCCKKKKKKKKKKKKKKKKKKKKKKKKKK

  7. knowiz 2 July, 2020 at 14:07 Reply

    Next time try to separate the business logic with the SQL. Use views and handle most SQL from the database to make work easier.

  8. Lionel G ลีโอ 2 July, 2020 at 14:07 Reply

    @clever Techie. Thanks a lot for your tutorial. I'm newbie in php/sql. Why don't you use INNER JOIN between movies table and movies_genres, movies_directors or movies_stars tables?

  9. LouisUpLoaded 2 July, 2020 at 14:07 Reply

    Hey Clever Techie! Great tutorial and great tutorial series! Your really cover a great deal of detail and make sure the viewer realize where the tricky sections are. And then you clearly explain those tricky sections. Keep up the good work!! Thanks!

  10. Şahin Aygün Yıldırım 2 July, 2020 at 14:07 Reply

    I have 5 tables in which I define something with id's and have another table in which I combine that id's in a row. I try to select them with the query below but it works properly but gives me only the first row of the table
    "SELECT anlasma.anlasmaID, fakulte.fakulteAdi, bolum.bolumAdi, koordinator.koordinatorAdi, ulke.ulkeAdi, universite.uniAdi FROM anlasma, fakulte, bolum, koordinator, ulke, universite WHERE anlasma.fakulteID=fakulte.fakulteID AND anlasma.bolumID=bolum.bolumID AND anlasma.koordinatorID=koordinator.koordinatorID AND anlasma.ulkeID=ulke.ulkeID AND anlasma.uniID=universite.uniID"

    Should I use JOIN to get all the results?
    Waiting forward to your respond to that,
    Thanks in advance 🙂

  11. mjc1o196 2 July, 2020 at 14:07 Reply

    Great video man, definitely subscribed.
    How would you go about then making each title a link to a…movieinfo.php file where the user could view further information about that movie?
    I think that would be a lot of fun.

  12. yvibes 2 July, 2020 at 14:07 Reply

    Is there any way you can help me with my project? I want to make a search bar that I want to link to a database like this. It will be a database about video games. I want the information to be displayed like you've done in this video

  13. Hyunki Yu 2 July, 2020 at 14:07 Reply

    I dare think that I might be able to make them as a class method and call it. since genre code and director codes are simillar structure. I'm gonna try it after work. Thanks!

Leave a reply