I have a table made up of podcasts I have done, song, artist, title mix number date and etc. I am using a class with individual methods to display them in separate
My question is, how do you get desc rows? Like this (mix_number is an int)
select mix_name, date where mix_number = MAX(mix_number) limit 1 //1st query
select mix_name, date where mix_number = MAX(mix_number - 1)//this would be the second query
select mix_name, date where mix_number = MAX(mix_number - 2)//3rd query
I dont want to hardcode the where clause with a number because I want it to update as I add more.
I am really asking is MAX(mix_number) or MAX(mix_number-1) proper? I cant get it to work this way
I hope this is understandable. I have other queries in the methods but an answer here will fix them too.
descrows? Are you saying you're trying to specifically query the rows with the top N mix_numbers? Is there a need to query them with separate SELECT statements?