List:General Discussion« Previous MessageNext Message »
From:Gustavo Andrade Date:May 17 2004 6:33am
Subject:COUNT
View as plain text  
select count(distinct membros.ID) as total_membros, count(distinct
replays.ID) as total_replays, count(distinct downloads.ID) as
total_downloads from membros,replays,downloads;
 
if one of the tables have 0 records all the counts will turn to 0
the count works only if all the tables have records
how can i fix that?
 
_________________________________________________
Quer ter um fórum para seu clan de Starcraft/BroodWar, Counter-Strike,
Warcraft ou outros. entre em 
http://www.arena-star.com.br/forum/
 

Thread
COUNTGustavo Andrade17 May
  • Re: COUNTJohn Fawcett17 May
  • Re: COUNTDan Nelson17 May