Ok, here is the situation. We are on mysql 4.0.17 and are waiting to update to 4.1 until it is out of alpha. What I have is a biweekly magazine that could run any number of stories an issue. We are currently displaying the last 3 issues. They had limited to 3 stories per issue online but are starting to move away from that. I obviously cannot perform a sub-query on this version of mysql so I was wondering if my "work around" is a sane one.
What I've done is set up two queries, the first pulls the max issue number where the date is now or greater. I then used php to calculate back 3 issues to get my "array" Using those value I run the second query and pull each stories title, author and abstract for those 3 issues. My question is, is there a better way or will this work.
Ignore the design of this please... I haven't gotten to that stage, I have only recently taken over.
What I've done is set up two queries, the first pulls the max issue number where the date is now or greater. I then used php to calculate back 3 issues to get my "array" Using those value I run the second query and pull each stories title, author and abstract for those 3 issues. My question is, is there a better way or will this work.
Ignore the design of this please... I haven't gotten to that stage, I have only recently taken over.