Sort information from database into a table
I am trying to sort all of this information into a small table which I looked up on a tutorial, however I am having problems :/

I had this originally:

    $sql = "SELECT * FROM venues WHERE id IN (" . implode(",",$aVenues) . ")";
    $comma_separated = implode(",", $aVenues);
    echo $comma_separated;
    
    // Execute query and fetch result rowset
    $result = mysql_query($sql);
    if ($result) {
      $rowset = array();
      while ($row = mysql_fetch_array($result)) {
        $rowset[] = $row;
      }
      var_dump($rowset);
    }
    else echo mysql_error();

And I changed it to this:

    $sql = "SELECT * FROM venues WHERE id IN (" . implode(",",$aVenues) . ")";
    $comma_separated = implode(",", $aVenues);
    echo $comma_separated;
    
    // Execute query and fetch result rowset
    $result = mysql_query($sql);
    if ($result) {
      $rowset = array();
      while ($row = mysql_fetch_array($result)) {
        $rowset[] = $row;
      }
      
      echo "<table border='1'>";
    echo "<tr> <th>Name</th> <th>Age</th> </tr>";
    // keeps getting the next row until there are no more to get
    while($row = mysql_fetch_array( $rowset)) {
    	// Print out the contents of each row into a table
    	echo "<tr><td>"; 
    	echo $row['VENUE_NAME'];
    	echo "</td><td>"; 
    	echo $row['ADDRESS'];
    	echo "</td></tr>"; 
    } 
    
    echo "</table>";
      
      
      
    }
    else echo mysql_error();


...and this is the error I am getting now :/

    Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/nightl7/public_html/demos/autocompletejquery/index.php on line 66

I also tried changing

    while($row = mysql_fetch_array( $rowset))
to

    while($row = mysql_fetch_array( $result))

but all that did was make the error disappear, but the rows weren't being displayed. Thanks everyone :))))! 
Sort information from database into a table
===

I am trying to sort all of this information into a small table which I looked up on a tutorial, however I am having problems :/

I had this originally:

    $sql = "SELECT * FROM venues WHERE id IN (" . implode(",",$aVenues) . ")";
    $comma_separated = implode(",", $aVenues);
    echo $comma_separated;
    
    // Execute query and fetch result rowset
    $result = mysql_query($sql);
    if ($result) {
      $rowset = array();
      while ($row = mysql_fetch_array($result)) {
        $rowset[] = $row;
      }
      var_dump($rowset);
    }
    else echo mysql_error();

And I changed it to this:

    $sql = "SELECT * FROM venues WHERE id IN (" . implode(",",$aVenues) . ")";
    $comma_separated = implode(",", $aVenues);
    echo $comma_separated;
    
    // Execute query and fetch result rowset
    $result = mysql_query($sql);
    if ($result) {
      $rowset = array();
      while ($row = mysql_fetch_array($result)) {
        $rowset[] = $row;
      }
      
      echo "<table border='1'>";
    echo "<tr> <th>Name</th> <th>Age</th> </tr>";
    // keeps getting the next row until there are no more to get
    while($row = mysql_fetch_array( $rowset)) {
    	// Print out the contents of each row into a table
    	echo "<tr><td>"; 
    	echo $row['VENUE_NAME'];
    	echo "</td><td>"; 
    	echo $row['ADDRESS'];
    	echo "</td></tr>"; 
    } 
    
    echo "</table>";
      
      
      
    }
    else echo mysql_error();


...and this is the error I am getting now :/

    Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/nightl7/public_html/demos/autocompletejquery/index.php on line 66

I also tried changing

    while($row = mysql_fetch_array( $rowset))
to

    while($row = mysql_fetch_array( $result))

but all that did was make the error disappear, but the rows weren't being displayed. Thanks everyone :))))! 