Ver Mensaje Individual
  #2 (permalink)  
Antiguo 24/05/2009, 11:43
jurena
Colaborador
 
Fecha de Ingreso: marzo-2008
Ubicación: Cáceres
Mensajes: 3.735
Antigüedad: 17 años
Puntos: 300
Respuesta: Uniom de 2 Tablas php y mysql

No lo he probado:

Código php:
Ver original
  1. <?php
  2. include "conexion.php";
  3. $sent="(SELECT id, nom, direc, cont FROM live) UNION ALL (select id, nom direc, cont FROM live2) ORDER BY cont";
  4. $res = mysql_query($sent, $conn);
  5. while($row = mysql_fetch_array($res)){?>  
  6. <linea blog="<?php echo $row['nom'];?>" direccion="<?php echo $row['direc'];?>"/>
  7. <?php
  8. }  
  9. ?>