Max numbers... ordering... etc.
Posted: Sun Jun 24, 2007 9:50 pm
So here's what I've got.
There's 10 rows: news1, news2, news3..news10. Each of them has an ID in it, and that ID represents the piece of news in another table. (they have the same IDs, long story)
So the way I update is weird, but what matters here is the solution.
My values for the news entries will be like,
news1 = 10, news2 = 14, news3 = 30
And what I need to do, is take all of those entries, and find which is the lowest of them all, and replace it.
Basically, I just need a way to find those 10 values, and find which is lowest of them. How do I do it?
There's 10 rows: news1, news2, news3..news10. Each of them has an ID in it, and that ID represents the piece of news in another table. (they have the same IDs, long story)
So the way I update is weird, but what matters here is the solution.
My values for the news entries will be like,
news1 = 10, news2 = 14, news3 = 30
And what I need to do, is take all of those entries, and find which is the lowest of them all, and replace it.
Basically, I just need a way to find those 10 values, and find which is lowest of them. How do I do it?