|
Posted by J.O. Aho on 04/02/06 08:02
Goomba wrote:
> i need to combine two tables, then retrieve unique results. this works, but
> it is also outputting all the movie_ids in mMovies as well, which results in
> duplicates. i only want one. how can i make this work? Thanks!!
>
> SELECT DISTINCT mMovies_Genres.movie_id, title_the, title, season, genre_id
> FROM mMovies, mMovies_Genres
> WHERE mMovies.movie_id = mMovies_Genres.movie_id
> AND bonusDisc is null
>
>
drop the mMovies_Genres.movie_id as all the entries (should at least be)
unique or you will get all. If you need to get this value too, then use GROUP
BY instead of DISTINCT.
//Aho
[Back to original message]
|