matching problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Irlan agous

    matching problem

    Hello all, i have this matching story. What i want to do, is to check the
    variable $betaling if this is 0 or 1. But the id from the tabel form have to
    be compared with $persid from the table reactie. thats not the problem, the
    problem is i am not able to make 2 queries in one while statement, does
    anyone knows how to solve this?

    Irlan


    $query = "SELECT a.oproep,b.opro ep, a.react, b.react, a.logid, b.logid,
    a.persid,b.pers id, a.logemail, b.logemail,a.pe rsemail,b.perse mail

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

    $result = mysql_query($qu ery);

    $query_data = mysql_fetch_row ($result);//

    if($result = mysql_query($qu ery)){
    $rows = mysql_num_rows( $result);

    if($rows<1){
    echo "<p>You have no Matches";

    } else {


    echo "<p>You have $rows Match(es)<p><p> ";

    }}

    while($query_da ta = mysql_fetch_arr ay($result)){

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


    $sql= "SELECT betaling from form where id='$persid'";
    $res = mysql_query($sq l);
    $query_data = mysql_fetch_row ($res);
    while($query_da ta = mysql_fetch_arr ay($result)){
    $betaling= $query_data["betaling"]

    }
    if ($betaling="0") {
    echo "your contact did not pay for this service yet, he will be notified,
    you dont have to pay for this service";
    } else {

    echo " <tr>\n";
    echo " <td align=center bgcolor=FFECC4 ><font
    color=black><a
    href=\"javascri pt:Pop550Pictur e('../pic/klanten/gegevens.php?id =$persid')\"><p >$oproep</a></td>\n";//

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


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

    }}


Working...