Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Nov 2008
    Location
    Melbourne, Australia
    Posts
    69
    Thanks
    8
    Thanked 1 Time in 1 Post

    having trouble displaying results

    hey everyone, im having trouble displaying the results from table

    table name is round1
    col names homeTeam, awayTeam, choice

    both the homeTeam and awayTeam col have 8 rows of data already in them but the choice is empty.

    nothing at all comes up except for the html table. i hope to have all the data to match the html layout,with the exception of the date

    this is what i have so far

    PHP Code:

    <body>


    <table>
       <tr>
          <td>Date</td>
          <td>Home</td>
          <td>Vs</td>
          <td>Away</td>
       </tr>

    </table>
    <?php

    $sql 
    "SELECT homeTeam,awayTeam FROM round1 ";

       
    $results mysql_query($sql$dbh) or die (mysql_errno($dbh) . ":" mysql_error($dbh) );


       
    $row mysql_fetch_assoc($results);

       
       echo 
    $results;

    ?>
    thanks in advanced for the help

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,865
    Thanks
    160
    Thanked 2,224 Times in 2,211 Posts
    Check the manual to see how to display the data from DB using mysql_fetch_assoc()
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)


  •  

    Posting Permissions

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