List:General Discussion« Previous MessageNext Message »
From:SGreen Date:January 13 2005 9:49pm
Subject:Re: counting records in 2 tables using 1 query
View as plain text  
There may be other ways to get at the information you want. What is the 
purpose of your query? 

Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine


2wsxdr5 <2wsxdr5@stripped> wrote on 01/13/2005 01:57:31 PM:

> I have these 2 queries.
> 
> SELECT count(*) gifts
> FROM   gift g
> WHERE g.this and g.that
> 
> SELECT count(*) events
> FROM   events e
> WHERE e.this and e.the other thing
> 
> is there a way to put these into one query.....
> 
> SELECT count(g.*) gifts, count(e.*)
> FROM gift g, event e
> WHERE . . . .
> 
> so far nothing seems to be working
> 
> -- 
> Chris W
> 
> Gift Giving Made Easy
> Get the gifts you want & give the
> gifts they want this holiday season
> http://thewishzone.com
> 
> "They that can give up essential liberty
> to obtain a little temporary safety
> deserve neither liberty nor safety."
> -- Benjamin Franklin, 1759 Historical Review of Pennsylvania
> 
> -- 
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    http://lists.mysql.com/mysql?unsub=1
> 

Thread
counting records in 2 tables using 1 query2wsxdr513 Jan
  • Re: counting records in 2 tables using 1 queryPeter Brawley13 Jan
  • Re: counting records in 2 tables using 1 querySGreen13 Jan
    • Re: counting records in 2 tables using 1 query2wsxdr514 Jan
      • Re: counting records in 2 tables using 1 querySGreen14 Jan