Ver Mensaje Individual
  #1 (permalink)  
Antiguo 01/02/2012, 04:01
Avatar de protoameeba
protoameeba
 
Fecha de Ingreso: septiembre-2005
Mensajes: 195
Antigüedad: 18 años, 7 meses
Puntos: 3
Pregunta Select 2 tablas MYSQL y PHP

Buenas tengo esta consulta que al ejecutarla directamente en MYSQL me hace bien la pesquisa:


SELECT votos FROM album_1 UNION ALL SELECT votos FROM album_2 ORDER BY votos DESC LIMIT 3


pero en el php no me muestra nada


Código PHP:
Ver original
  1. $resultado=mysql_query("SELECT votos FROM album_1 sintaxis UNION ALL SELECT votos FROM album_2 ORDER BY votos DESC LIMIT 3");
  2. while ($array = mysql_fetch_array($resultado) ) {
  3. $portada = $array[portada];
  4. echo "<img src='$portada'/>";
  5. echo "<br/>";

Alguien podria decirme que hago mal? Es un error en el PHP... no?
__________________
Ser libre no es hacer lo ke uno kiere, sino kerer lo ke uno hace....