mysql - SQl Left Join Query -


these tables have(i got this):

 table building: b_id(key relation table build-works b_id):1 2 3   field1: buildinga, buildingb,  buildingc   table build-works: b_id:1 1 2 3 3 3  w_id: 1 2 1 1 2 3   table works: w_id(key relation table build-works w_id): 1 2 3 4  field1: electricity, sanitary, shell,  roofing 

now want know works per building? how can sql, , can give example zend_db? thanks

using left joins since in title

select *   building b         left join buildworks bw           on b.b_id = bw.b_od         left join works w           on bw.w_id = w.w_id  

Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -