Re: select from multi tables

From: Date: Mon, 03 Feb 2003 13:12:27 +0000
Subject: Re: select from multi tables
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-25365@lists.php.net to get a copy of this message
> SELECT SUM(T1.F1) AS C1, SUM(T2.F1) AS C2 FROM T1, T2 Hi, T1,T2 is a join of the two tables which means that you combine each value of T1 with each value of T2. This is why you don't get the result you want. In your case I simply would do two querys as it won't make any problems: SELECT SUM T1.F1 FROM T1; SELECT SUM T2.F2 FROM T2; Regards, Bastian

« previous php.db (#25365) next »