ive had searched on this forum but cant get it to work how i want it no matter what, if anyone can help please do
im trying to compare the topic_id from one table to another and if its found dont display that result atm the code is
in news.php i have
<? for ($i = 0; $i < count($news); $i++) {
?>
html to display posts e.g $news[$i]['topic_id']
<?php
}
?>
in approve.php the other i have
$db = mysql_connect($dbServer, $dbUserName, $dbPassword) or die(mysql_error());
mysql_select_db($dbDatabase, $db) or die(mysql_error()); ?>
<? $aq = "SELECT topic_id FROM approve_posts";
$ar = mysql_query ($aq) or die('approve SQL Query Failed');
$approve = mysql_fetch_assoc ($ar)
?>
so i basically want if $approve = $news[$i]['topic_id'] then skip that result and display the rest.