SQL INNER JOIN
$count++; if($count == 1) { include "../mobilemenu.php"; } if ($count == 2) { include "../sharemediasubfolder.php"; } ?>
An SQL Inner Join is the default type of JOIN.
In an SQL Inner Join, if there is data in Table A, and there is data in Table B the row will be joined.
If there are rows in Table A, but no matching row in Table B it will not be shown.
Also if there are no rows in Table A, but there are matching rows in Table B, it will not be shown.
For instance imagine that there are two tables. Employee and Department.
Imagine that we have two tables, Employee and Department as given below.
Employee Table
Department Table
For the above scenario, we can join the two tables using the JOIN clause.
SELECT EMPLOYEE.FIRSTNAME, EMPLOYEE.LASTNAME, DEPARTMENT.DEPARTMENTNAME
FROM EMPLOYEE INNER JOIN DEPARTMENT
ON EMPLOYEE.DEPARTMENTID = DEPARTMENT.DEPARTMENTID
Result:
By doing that, we are successfully able to show the department name also in the result.