ya lo he solucionado, el problema, era la query
Código PHP:
$sql = "SELECT c.id AS idcli, c.Nombre as nomcli,c.Apellidos as appcli, c.email as email, e.Nombre as nomemp FROM clientes c, empresas e WHERE c.IdEmp=e.Id";
y el código quedaría así:
Código PHP:
<?php
session_start();
include_once "includes/conexionDB.php";
$link = db_connect();
//$sql = "select * from clientes";
//$sql = "select clientes.Id, clientes.Nombre, clientes.Apellidos, clientes.Email, empresas.Nombre from clientes INNER JOIN clientes on clientes.Id = empresas.IdEmp";
$sql = "SELECT c.id AS idcli, c.Nombre as nomcli,c.Apellidos as appcli, c.email as email, e.Nombre as nomemp FROM clientes c, empresas e WHERE c.IdEmp=e.Id";
$rs = mysql_query($sql,$link);
?>
<body>
<h4>Listado de Clientes</h4>
<br>
<?php
echo "<table>";
echo "<tr>";
echo "<th>Id</th>";
echo "<th>Nombre</th>";
echo "<th>Apellido</th>";
echo "<th>E-mail</th>";
echo "<th>Empresa</th>";
echo "<th>Editar</th>";
echo "<th>Eliminar</th>";
echo "</tr>";
while ($row = mysql_fetch_row($rs)){
echo "<tr>";
echo "<td>$row[0]</td>";
echo "<td>$row[1]</td>";
echo "<td>$row[2]</td>";
echo "<td>$row[3]</td>";
echo "<td>$row[4]</td>";
echo "</tr>";
}
echo "</table>";
?>
</body>