how i 3 turn low mysql query?
this competence small tough explain, nonetheless i try.
i wish arrangement list categories (stored 1 table), array domains compared any problem (stored another table).
the gorilla wrench box any domain set annals compared (which stored 3rd table). i wholly wish arrangement categories have domains compared them, count domains should simulate wholly domains have annals compared (from 3rd table).
my tide query
select r.rev_id, c.cat_id, c.cat_name, count(d.dom_id) rev_id_count reviews r
inner join domains d r.rev_domain_from=d.dom_id
inner join categories c d.dom_catid=c.cat_id
where rev_status = 1
group cat_name
order cat_name
this selects repremand problem names, nonetheless shows fake count (rev_id_count). problem 2 domains it, any domain 2 records, arrangement count 4, should 2.
Comments
Post a Comment