Re: summing from multiple tables

2004-11-20 Thread Rhino
- 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

Re: summing from multiple tables

2004-11-20 Thread Kevin Cagle
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,

summing from multiple tables

2004-11-19 Thread Kevin Cagle
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

Re: summing from multiple tables

2004-11-19 Thread Leo
- 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

Re: summing from multiple tables

2004-11-19 Thread Rhino
- 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

Re: summing from multiple tables

2004-11-19 Thread Kevin Cagle
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.