List:General Discussion« Previous MessageNext Message »
From:Brandon Ewing Date:December 17 2003 9:43pm
Subject:RE: Issues with count(), aliases, and LEFT JOINS
View as plain text  
 

> -----Original Message-----
> From: Chris [mailto:chris@stripped] 
> Sent: Wednesday, December 17, 2003 8:12 AM
> To: mysql@stripped
> Subject: RE: Issues with count(), aliases, and LEFT JOINS
> 
> Try changing it to this:
> 
> ...
>     ->  COUNT(DISTINCT switch_connect1.switch_id) AS left_port_count,
>     ->  COUNT(DISTINCT switch_connect2.switch2_id) AS 
> right_port_count,
> ...
> 
> I would suggest, if that suggestion fails, that you 
> experiment with just
> switch_connect.switch_port and switch_connect.switch2_port . 
> Problems are
> much easier to define and solve if you simplify them down to 
> the basics. If
> you're able to do what you want with those values Then you can add the
> complexity of JOINing to other tables and you'll know when it 
> 'should work'
> and not.
> 
> Chris
> 

That fixed it, thanks bunches.  There any explaination as to why that made
it work?

Brandon

Thread
Issues with count(), aliases, and LEFT JOINSBrandon Ewing15 Dec
  • RE: Issues with count(), aliases, and LEFT JOINSBrandon Ewing17 Dec
    • RE: Issues with count(), aliases, and LEFT JOINSChris17 Dec
      • RE: Issues with count(), aliases, and LEFT JOINSBrandon Ewing17 Dec