";
echo "Go Back";
} else {
for($i = 0; $i < sizeof($arrWords); $i++){
$result = mysql_query("select articleIds from searchWords where word = '".(string)$arrWords[$i]."'");
if(mysql_num_rows($result) > 0){
// Get the id's of the articles
$j=0;
while($row1 = mysql_fetch_array($result)){
$arrIds[$j]=$row1[0];
$j++;
}
//$arrIds = explode(",", $row[0]);
$arrWhere = implode(" OR aid = ", $arrIds);
$aQuery = "select aid, title, summary from articles where aid = " . $arrWhere;
$aResult = mysql_query($aQuery);
$count = 0;
$articles = array();
if(mysql_num_rows($aResult) > 0){
while($aRow = mysql_fetch_array($aResult)){
$articles[$count] = array (
"aid" => $aRow["aid"],
"title" => $aRow["title"],
"summary" => $aRow["summary"]
);
$count++;
}
}
if(isset($articles)){
//$articles = array_unique($articles);
echo "";
foreach($articles as $a => $value){
?>
">
">
http://www.infraterra.net/articles.php?aid=
";
echo "Go Back";
}
}
}
}
include("page_parts/nav.php");
include("page_parts/footer.php");
?>