Unfortunately that won't help. I'll explain: I insert the texts into the database whenever I get enough information on a subject to write a little text about it. The texts are about history, so a text on events in the 17th century should appear on the webpage before a text about events in the 20th century, but I may have inserted the text about the 20th century several weeks before I inserted the text about the 17th century. On the webpage, therefore, the text that is in row 7, for example, may actually be the first text on the page, while the text in row 1 should really appear last in order for the sequence of texts to make sense.
How can I stipulate the order in which the rows should be displayed in the webpage? So that I can say (this is just pseudocode, but you see what I mean):
if ($title=="The 17th century")
{
$title=$title1;
}
elseif ($title=="The 18th century")
{
$title=$title2;
}
//and so on and so forth
$title_order=array($title1, $title2 ...); //etc., etc.
while ($row = mysql_fetch_array($result)) {
for ($i=0; $i<n; $i++) {
echo "$row[$title_order[$i]]" . "<br />" . "$row["content"]";
}
}
So I'm trying to pull out all the data in a table and put it in order of historical sequence. I actually tried a script very similar to the one I've shown here and all the texts and titles just disappeared from the HTML page - no error messages, just nothing.
Thanks for any help you can give
Norman