Bladephp: Now with 8+ codeigniter, php, and laravel project 8+ php project From $37/Month From Rs. 2499/Month

MySQL Multiple Joins in one Query

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);


Html code work in comment box

Related Post