MySQL Question (joins) -


i'm not mysql joins, maybe give me hand. i've got following tables:

table   fields id,name  table b   fields aid,cid,id,found  table c   fields id,name 

the result want following: want records b.found = 1. of these records don't want a.id or a.name, want number of records have been returned if have wanted so. if there 5 records have b.found = 1 , c.id = (for example) 3, want returned value of 5, c.id , c.name.

someone able this?

actually want database: list of records in table c , count of records in table b has found = 1 , b.c_id = c.id

table: fields: id, name  table: b fields: aid, cid, found  table: c fields: id, name    select c.id, c.name, count(1) b join c on c.id = b.cid , b.found=1 group c.id 

Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -