List:General Discussion« Previous MessageNext Message »
From:Michael Stroh Date:June 3 2010 3:23pm
Subject:Help needed on query on multiple tables
View as plain text  
Hi everyone. I'm trying to create a certain MySQL query but I'm not sure how to do it.
Here is a stripped down version of the result I'm aiming for. I'm pretty new to queries
that act on multiple tables, so apologize if this is a very stupid question.

I have one table (data) that has two columns (names and progress). I have a second table
(items) that has two columns (names and version). I'd like to do a query that produces
the name of every record in data that has progress set to 0 and the number of records in
the items table that have the same value in each table.names field.

I can perform this by using two sets of queries, one that queries the data table and then
loop through the names to do a count(names) query, but I'm not sure if I can somehow do
it in one query.

Thanks in advance!
Michael

Thread
Help needed on query on multiple tablesMichael Stroh3 Jun
  • RE: Help needed on query on multiple tablesSteven Staples3 Jun
    • Re: Help needed on query on multiple tablesMichael Stroh3 Jun
      • RE: Help needed on query on multiple tablesSteven Staples3 Jun