I need to get information from 2 tables in the same mysql database
$sql = mysql_query("SELECT * FROM notes, customers WHERE `to`='next' LIMIT 5");
while($a = mysql_fetch_array($sql)){
$row_color = ($row_count % 2) ? "#EFEFEF" : "#FFFFFF";
echo("<tr bgcolor=\"$row_color\">
<td height=\"25\">" . $a['custid'] . "</td>
<td height=\"25\">" . $a['name'] . "</td>
<td>" . $a['ebay'] . "</td>
<td>" . $a['title'] . "</td>
<td>" . $a['type'] . "</td>
</tr>");
$row_count++;
}
The name and ebay fields are in the customer table and the rest are in the notes table. The code above doesnt produce any error just no rows are displayed