Cita:
Iniciado por Carlojas
Que tal
Toni85, te da el mismo error de sintaxis? o el array no esta devolviendo resultado, prueba así tu código, primero verifica que tu consulta no tenga errores utilizando
mysql_error()
include("conectarse.php");
Código PHP:
<?php
$link = Conectarse();
$result = mysql_query("SELECT profile.first_name AS nombre, profile.last_name AS apellido
FROM profile INNER JOIN profile_education ON profile.id_user=profile_education.id_user_ed
WHERE profile_education.university LIKE '%UNED%' AND profile.first_name LIKE '%Antonio%' AND profile.last_name LIKE '%Castillo%'
ORDER BY profile.last_name", $link) or die("Error en query:".mysql_error());
?>
<table border="1">
<tr>
<th>First name</th>
<th>Last name</th>
</tr>
<?php
while($row = mysql_fetch_array($result)) {
echo "<tr>";
echo "<td>'".$row['nombre']."'</td>";
echo "<td>'".$row['apellido']."'</td>";
echo "</tr>";}
?>
</table>
</body>
</html>
Saludos.
Ahoraaaaa!! funciona!
Mil gracias a los dos jeje!!
Ahora el problema que tengo es que si le meto el if antes del while (para comprobar si hay resultados, sino q devuelva un echo) no me da resultado, podría ser por el puntero?
EDITADO: SOLUCIONADO!!
Gracias!