hi everyone welcome to my channel my
clicks so today we will be learning how
to implement joins in PHP so for that we
need two tables that is one I have made
a student record table that contains the
record of the student with the name as
student name at present the phone number
and the second table is student result
that will display the results of that
particular student so what we need is we
need a single table in which student
record as well as the result of the
student should be displayed so that is
possible only with the help of joint so
in order to fetch record from both the
tables what we need we need a connection
the database name is JD s1 I can specify
here is if the connection not made then
it will display as the message field so
now I'm implementing the Curie let it be
a she dogs and we can have joints joints
demo 1 dot PHP okay so what I need here
is I will be referring both the tables
like it's select star from so we were
like we are having two tables like what
I am going to refer here is select star
from student records and Ricketts record
comma and student result
result I'm giving its nameís SR and to
student record
I'm giving its name as st heart so ya
know in the case of what does it this
star means this star means that I'm
fetching all the columns of student
record table as well as all the column
of student result ever but for the right
now I need only name address and phone
number from student record table and
only the result column from the student
result able so what I am what I will
specify here is that student record dot
star that means that I have fetched all
the I have selected all the columns of
student record table and SR SR is my
student result table because I have
created in the lives of students result
so I need only result column so I can
specify her as SR dot result from
student STR and we're now student record
student record has a you has a primary
key
it's a student record the name is STR
dot ID this ID is prime D over here and
in the student result table this is
basically the same ID which I am
referring here instrument car table ID
follow so here it becomes the foreign
key so what I am going to do here is STR
dot ID means student record dot ID
equals to where equals to student result
means s r dot s d ID means in this
column where it matches so I'm going to
now execute this Kure
you know I'm going to fetch this the
result so I'm going to make a table a
simple table over here so that all the
record should be displayed in my table
only I will make column let it be its
name address and phone number and result
right so name address phone number and
result name address phone number and
result so here I will just close and
here table row 10 table data so row it's
s team name s T address st phone and the
last I need is st result that is
available in my this result table so
let's check what it's giving me its
joints to move one so something I have
fetched the name phone number and result
column but something wrong is being
there in that recipe st a it's strapless
so I'm going to refresh here it's
displayed so the name address and the
phone number is being displayed from the
student record table but the student
result table the result column is
displayed from the student resulting so
in this way we can join two tables and
can display data
the single table thanks for watching the
video and don't forget to follow me on
Netflix on Facebook as well as YouTube
thanks for watching