I have two mysql result queries that I am trying to compare to each other and then only display the ones that do not match each other.
Code: Select all
$result202 = mysql_query("SELECT * FROM (SELECT * FROM scheduledjobs WHERE propid='$propid201' AND departclean='ON' AND date<'$workdate' ORDER BY date DESC) AS foo GROUP BY propid");
while ($row202 = mysql_fetch_array($result202))
{
$propid202 = $row202['propid'];
$lastdate202 = $row202['date'];
if($lastdate202<=$lastdepart){
/*echo "$propid202 - These are just departures with a last date of $lastdate202<br>";*/
$result203 = mysql_query("SELECT * FROM (SELECT * FROM scheduledjobs WHERE propid='$propid202' AND arrivalchk='ON' AND date BETWEEN '$lastdepart' AND '$workdate' ORDER BY date DESC) AS foo GROUP BY propid");
while ($row203 = mysql_fetch_array($result203))
{
$propid203 = $row203['propid'];
$lastdate203 = $row203['date'];
echo "$propid202 - These are the departures with arrivals within $lastdepart and $workdate<br>";
}Any help would be much appreciated.