Alright, I've got a database with multi-part articles. The parts of the article are stored in a table called pages with fields: 'aid'(article id) 'pid'(part id) 'pname'(partname) and 'text'. each part has its own row.
I'm trying to create a script to display all the parts of a given article.
i can't seem to get this right, heres the chunk of code:
any suggestions?PHP Code:$sql = mysql_query("SELECT pname, text FROM pages WHERE aid=$aid AND pid=$pid");
while ( $row = mysql_fetch_array($sql) ) {
$pid2 = $row["pid"];
$pname2 = $row["pname"];
$text2 = $row["text"];
echo("<p class=\"subtitle\">Part $pid2: $pname2<p>$text2");
$pid++;
}





Bookmarks