I have successfully created a script that filters through all the fields in the one to many relational table (see below) - and prints them out
$sql = 'SELECT articleID,relatedID FROM article_to_related WHERE articleID ='.$_GET['id'];
$rs = @mysql_query($sql,$conn);
if ($rs) {
$listAllArticle = '<select name="allArticles[]" multiple class="bodycopylinks" style="width:300px;" size="4">';
while ($row2 = @mysql_fetch_array($rs)) {
// NOW SELECT ARTICLE ID, HEADING
$sql3 = 'SELECT sub_article_id,heading FROM sub_article WHERE sub_article_id='.$row2['relatedID'];
//echo $sql3;
$rs3 = @mysql_query($sql3,$conn);
if ($rs2) {
while ($row3 = @mysql_fetch_array($rs3)) {
$listAllArticle .= '<option value="'.$row3['sub_article_id'].'">'.$row3['heading'].'</option>';
}
}
}
$listAllArticle .= '</select>';
}
echo $listAllArticle;
this prints out the information on the articles that are in the table, how do i do the opposite in other words, print out all the articles that are not inside the table?
thanks in advance.