SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Addict einSTein's Avatar
    Join Date
    Aug 2006
    Posts
    275
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    result output error

    this is the output and the problem that there r only 2 results in the database when the code makes fetch it prints the result 14 times inremeted by 1 every time i made fetch
    Name : wala2 omer
    Mail: a.medhat@gaegypt.com
    User : ahmed

    Name : mohab omer
    Mail: m@m.m
    User : ahmed

    Name : wala2 omer
    Mail: a.medhat@gaegypt.com
    User : ahmed

    Name : mohab omer
    Mail: m@m.m
    User : ahmed

    Name : wala2 omer
    Mail: a.medhat@gaegypt.com
    User : ahmed

    Name : mohab omer
    Mail: m@m.m
    User : ahmed
    this is the code
    Code MySQL:
    <?php
    echo "<br>";
    $result4 = mysql_query("SELECT u2.name, u2.mail, u2.jcat, u2.cpos, 
     
    u2.cpos, u2.Gen, u2.Expr, u2.empT, u2.eng, u2.fr , u2.span, u2.ge , u2.other , 
     
    pj.user, pj.jcat, pj.post, pj.age, pj.gen, pj.Expr, pj.emT, pj.eng, pj.frn, pj.spn, 
     
    pj.ger, pj.oth   FROM user2 u2 , postjobs pj WHERE u2.jcat = pj.jcat AND 
     
    u2.cpos = pj.post  AND u2.dob = pj.age AND u2.Gen = pj.gen AND u2.Expr 
     
    = pj.Expr AND u2.empT = pj.emT AND u2.eng = pj.eng AND u2.fr = pj.frn 
     
    AND u2.span = pj.spn AND u2.ge = pj.ger AND u2.other = pj.oth");
    //echo "<center>";
    $c = 1;
    while($row = mysql_fetch_array($result4)) 
    {
    echo "<table border='0'> 
    <td>Name : </td> 
    <td>" . $row['name'] . "</td> 
    </tr> 
    <tr>
    <td>Mail: </td> 
    <td>" . $row['mail'] . "</td> 
    </tr>  
    <td>User : </td> 
    <td>" . $row['user'] . "</td> 
    </tr>"; 
    echo"<br>";
    echo "</table>";  
    }
    ?>

  2. #2
    An average geek earl-grey's Avatar
    Join Date
    Mar 2005
    Location
    Ukraine
    Posts
    1,403
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Have you tried the query outside of PHP?

  3. #3
    SitePoint Addict einSTein's Avatar
    Join Date
    Aug 2006
    Posts
    275
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    do u mean to try it on another language like asp or .NET

  4. #4
    An average geek earl-grey's Avatar
    Join Date
    Mar 2005
    Location
    Ukraine
    Posts
    1,403
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In an apllication like MySQL command line client or phpMyAdmin

    If you don't have any of the two, you may want to try simple client I've developed: MyQuery.

  5. #5
    SitePoint Addict einSTein's Avatar
    Join Date
    Aug 2006
    Posts
    275
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i have phpmyadmin but i can't understand what u want me to do on

  6. #6
    An average geek earl-grey's Avatar
    Join Date
    Mar 2005
    Location
    Ukraine
    Posts
    1,403
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Paste your query there


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •