display help

OK here’s the situation. I have a list of articles in a table in a database and a list of series of articles in another table. Not all the articles belong to a series and the series contain a varying number of articles. Also there can be articles in between the end of one series and the start of another.

example

article number 1
article number 2
start of series A
article number 3
article number 4
end of series A
article number 5
start of series B
article number 6
end of series B

I am looking for a way to display this. I did not provide how the database is set up right now because that can be changed to meet the needs of this script.

Thanks in advance

I’d just use 1 table. There’s no need to have two tables for the same thing. I’d create a misc. series and put all your non-series articles in that group. To display, use an if statement, something like

if($prev_series != $row[‘series’]) {

// display

$prev_series = $row[‘series’];
}

Sponsor our Newsletter | Privacy Policy | Terms of Service