Jump to content

[SOLVED] Group By Order By problem


Herod

Recommended Posts

Hello,

I have this mysql data:

nIdAg | sTypeAg | sNameEventAg | dDateAg | sArtistAg | sLocationAg | sBileteAg | sDescriereRoAg | sDescriereEnAg | sPosterAg | nDeletedAg | nPrimaAg

1 | Concert | concert 20 | 2007-11-20 | concert 20 | concert 20 | concert 20 | concert 20 | concert 20 | deep_p_romania.jpg | 0 | 0

2 | Concert | concert 18 | 2007-11-18 | concert 18 | concert 18 | concert 18 | concert 18 | concert 18 | metalcamp_logo_fest_2007.jpg | 0 | 0

3 | Clubbing | Clubbing 27 | 2007-11-27 | Clubbing 27 | Clubbing 27 | Clubbing 27 | Clubbing 27 | Clubbing 27 | deep_p_romania.jpg | 0 | 0

4 | Clubbing | Clubbing 20 | 2007-11-20 | Clubbing 20 | Clubbing 20 | Clubbing 20 | Clubbing 20 | Clubbing 20 | picture_clubz.jpg | 0 | 0

 

i tried to used group by sTypeAg and order by dDateAg to get the infos about the most recent event that took place for one type of event.

so i am trying to display in a while in php a list with the most recent shows that will happend.

I don;t know why it's just show me the first occurence in the database for every type of shows.

in this case i want to display the concert that will took place in 2007-11-18 and the clubbing that will take place on 2007-11-20.

can anyone help me please?

Link to comment
https://forums.phpfreaks.com/topic/77427-solved-group-by-order-by-problem/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.