mysql - output sql statement is grouped -


To

I have the following statement is a little problem, mysql:

Select the
  Cmfilm *, Cmgenre.titel genretitel, in the form of cmvertoning. *, Cmzaal.titel cmfilm join cmvertoning on as zaaltitel left cmvertoning.film_id = cmfilm.id LEFT JOIN cmgenre on cmfilm.genre_id = cmgenre.id Join left Cmzaal Cmvertoningkzaal_id = Cmzaal Kid Where cmvertoning cmfilm.id ASC order by .id (74,74,74,74)  

because I'm asking the same ID 4 times it only gives me 1 results. But I have to return the result 4 times, as I had said to do it. Anyone knows how to solve this?

Perhaps it would be better to achieve this on the application side - returned rows into a map , Then iterate on the ID you expected and get the appropriate rows from the map. Because there is another problem - the lines can not be in the order of which you specified ID in order (Biteedblu. This line can also be used in order to find the problem).

Union solution will work, but, honestly, I think you have some design problems if you need to get several times the same lines.


Comments