- Original Message -
From: Kevin Cagle [EMAIL PROTECTED]
To: Rhino [EMAIL PROTECTED]
Cc: MySql List [EMAIL PROTECTED]
Sent: Saturday, November 20, 2004 12:11 AM
Subject: Re: summing from multiple tables
The solution to your problem is simple: don't attempt to do the final
query
You *are* getting both; you just aren't getting them in the same
result set.
Assuming you are executing both queries in the context of a program
that has
variables, that should be sufficient for you to do just about anything
you
can imagine.
Yeah, thought about that before I went to sleep. And,
Greetings, fellow MySQLers!
I know I ain't doing something right, but I don't know what. Say I have
a website. It has pages on it that get viewed. The hosting company
bills me each day for pages. So..
mysql select * from bill;
++--+
| amount | day |
++--+
| 1.10 | mon
- Original Message -
From: Kevin Cagle [EMAIL PROTECTED]
To: MySql List [EMAIL PROTECTED]
Sent: Saturday, November 20, 2004 10:46 AM
Subject: summing from multiple tables
mysql select sum(amount), sum(totaltimesviewed) from bill, pageviewed;
+-+---+
| sum
- Original Message -
From: Kevin Cagle [EMAIL PROTECTED]
To: MySql List [EMAIL PROTECTED]
Sent: Friday, November 19, 2004 10:46 PM
Subject: summing from multiple tables
Greetings, fellow MySQLers!
I know I ain't doing something right, but I don't know what. Say I have
a website
The solution to your problem is simple: don't attempt to do the final
query.
Each of your existing queries are perfectly fine the way they are and
give
sensible and meaningful answers. Simply run the 3rd and 4th queries as
two
separate queries rather than trying to combine them into one query.