Re: Query returns to many results

2006-02-24 Thread Schalk
Peter Brawley wrote: />Now this query is run over two tables and the ab_members table contains >around 302 rows. Around 1/3 of these will be where cup=kids. However, >when this query is run it returns 20,700 results / That's because your ... FROM ab_leader_board ablb, ab_members abm calls for

Re: Query returns to many results

2006-02-23 Thread Peter Brawley
>Now this query is run over two tables and the ab_members table contains >around 302 rows. Around 1/3 of these will be where cup=kids. However, >when this query is run it returns 20,700 results That's because your ... FROM ab_leader_board ablb, ab_members abm calls for a cross join--it a

Re: Query returns to many results

2006-02-23 Thread Martijn Tonies
> Again, I implore all SQL coders to use the explicit JOIN syntax on all > platforms that support it (Oracle being a well-known exception). It makes Oracle supports the ANSI JOIN syntax from v9 and up. > Shawn Green As for the rest, I fully agree. Martijn Tonies Database Workbench - development

Re: Query returns to many results

2006-02-23 Thread SGreen
Schalk <[EMAIL PROTECTED]> wrote on 02/23/2006 08:55:01 AM: > George Law wrote: > > Schalk , > > > > You need to specify the unifying column between your ablb and abm tables. > > > > ie - in your where, "and ablb.id=abm.id" > > > > Once you get this so it returns expected results, you can run the

Re: Query returns to many results

2006-02-23 Thread Schalk
George Law wrote: Schalk , You need to specify the unifying column between your ablb and abm tables. ie - in your where, "and ablb.id=abm.id" Once you get this so it returns expected results, you can run the query, prefaced with "explain" and it will give you an idea on the way mysql is runni

Re: Query returns to many results

2006-02-23 Thread George Law
Schalk , You need to specify the unifying column between your ablb and abm tables. ie - in your where, "and ablb.id=abm.id" Once you get this so it returns expected results, you can run the query, prefaced with "explain" and it will give you an idea on the way mysql is running the query. Thi