comparing problem

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

The problem is like this, There are a number of $rows resulting from the
query described below. There is a variable named payment, this has for
example the vualue 2. lets say the query had 5 results, the i want to do a
compare that it shows only 2, depending on the value of $payment

Can someone help me?

$query = "SELECT a.oproep,b.oproep, a.react, b.react, a.logid, b.logid,
a.persid,b.persid, a.logemail, b.logemail,a.persemail,b.persemail

FROM reactie a, reactie b
 WHERE a.logid = b.persid AND b.logid = a.persid AND a.logid='$logid' ";

$result = mysql_query($query);

$query_data = mysql_fetch_row($result);//     Haal de gegevens uit de tabel
if($result = mysql_query($query)){
   $rows = mysql_num_rows($result);

      echo "<p>You have no Matches";

   } else {

echo "<p>You have $rows Match(es)<p><p>";
while($query_data = mysql_fetch_array($result)){

       $oproep   = $query_data["oproep"];
       $persid    = $query_data["logid"];
        $reactie   = $query_data["react"];
       $logemail   = $query_data["logemail"];

     echo "  <tr>\n";
        echo "             <td align=center bgcolor=FFECC4 ><font

        echo "             <td align=center bgcolor=FFECC4 ><font
        echo "             <td align=center bgcolor=FFECC4 ><font
        echo "             <td align=center bgcolor=FFECC4 ><font
color=black><p><a href=\"mailto:".$logemail."\">".$logemail."</a></td>\n";

 echo "  </tr>\n";//


Site Timeline