MySQL Multiple Joins in one Query


You can use multiple tables in your single SQL query. The act of joining in MySQL refers to smashing two or more tables into a single table.

Assume we have two or more tables in TUTORIALS. Now take a look at the examples given below. You may also like MySQL Multiple Left Joins in one Query and Mysql Join Query.

First you can need database connection in php


$sql = "SELECT wo_jobs.* FROM wo_jobs INNER JOIN wo_clients ON = wo_jobs.client_id INNER JOIN wo_sectors ON = wo_jobs.sector_id WHERE wo_jobs.jobcode = '154' "; 
$result = mysqli_query($con,$sql);