Sona Rijesh
Sona Rijesh

Reputation: 1035

Join two tables in mysql and show answer in table

enter image description here

Here is my table. By joining first 2 table i need answer in php as in third table

I tried query

            $sql="SELECT 
                ROUND(duct1.length * duct2.duct_63, 1) as d1, 
                ROUND(duct1.length * duct2.duct_125, 1) as d2,
                ROUND(duct1.length * duct2.duct_250, 1) as d3, 

                FROM duct1 JOIN duct2";

By values repeating. Please help me..

Upvotes: 0

Views: 68

Answers (1)

user4640949
user4640949

Reputation:

A JOIN query goes like this.

SELECT
   (field1, field2, field3)
FROM table1
JOIN fieldname
ON table1.field1 = table2.field1
WHERE fieldname = $fieldname

Maybe this will help you?

Upvotes: 1

Related Questions