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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.