include 'includes/config.php';
$sql = "select l.id, l.price, l.mls, a.name As agent, c.name As category, s.name As status from listings l
INNER JOIN agents a ON a.id = l.a_id
INNER JOIN categories c ON c.id = l.c_id
INNER JOIN status s ON s.id = l.status";
$res = mysql_query($sql,$conn) or die(mysql_error());
while ($row = mysql_fetch_assoc($res)) {
echo " <tr><td>";
print $row['mls'].'</td><td>'.
$row['category'].'</td><td>'.
$row['price'].'</td><td>'.
$row['agent'].'</td><td>'.
$row['status'].'</td><td><a href="listing.php?method=edit&id='.
$row['id'].'">Edit</a> <a href="listing.php?method=delete&id='.
$row['id'].'">Delete</a></td></tr>';
}
echo '</table>';
Why is this not working? Can someone please help?