me funciono des esta manera pero tengo un problema
las tablas son de un preceso de produccion y el producto puede ser que apenas este en el primer preceso y por lo tanto en la siguiente tabla estara vacio los datos si, el problema es que si en la tabla core coil no hay datos al momento de hacer la consulta no me da ningun dato
Código PHP:
Ver original<?php
//insertamos los headers que van a generar el archivo excel
header('Content-type: application/vnd.ms-excel'); //en filename vamos a colocar el nombre con el que el archivo xls sera generado
header("Content-Disposition: attachment; filename=consulta.xls"); //recogemos la variable de fecha con la que limitaremos la cinsulta.
//hacemos la conexion al servidor MySql
//realizamos la consulta
//$tipo = $_POST['tipo'];
//$dato = $_POST['dato'];
//$inicio = $_POST['inicio'];
//$final = $_POST['final'];
$query=mysql_query ("SELECT * FROM info WHERE schedule ='s750000'"); $qye=mysql_query ("SELECT * FROM embobinado WHERE schedule ='s750000'"); $qyes=mysql_query ("SELECT * FROM corecoil WHERE schedule ='s750000'");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<body><!-Vamos a crear una tabla que será impresa en el archivo excel->
<!-creamos la tabla de el reporte con border 1 y los títulos->
<table width="641" border="1">
<tr>
<th width="50%" style="background-color:#006; text-align:center; color:#FFF"><strong>suffix</strong></th>
<th width="50%" style="background-color:#006; text-align:center; color:#FFF"><strong>Serie</strong></th>
<th width="50%" style="background-color:#006; text-align:center; color:#FFF"><strong>Id TX</strong></th>
<th width="50%" style="background-color:#006; text-align:center; color:#FFF"><strong>Linea</strong></th>
<th width="50%" style="background-color:#006; text-align:center; color:#FFF"><strong>Area</strong></th>
<th width="50%" style="background-color:#006; text-align:center; color:#FFF"><strong>KVA'S</strong></th>
<th width="50%" style="background-color:#006; text-align:center; color:#FFF"><strong>Numero de reloj del operador</strong></th>
<th width="50%" style="background-color:#006; text-align:center; color:#FFF"><strong>Numero de reloj del reparador</strong></th>
<th width="50%" style="background-color:#006; text-align:center; color:#FFF"><strong>Falla</strong></th>
<th width="50%" style="background-color:#006; text-align:center; color:#FFF"><strong>Codigo</strong></th>
<th width="50%" style="background-color:#006; text-align:center; color:#FFF"><strong>Fase</strong></th>
<th width="50%" style="background-color:#006; text-align:center; color:#FFF"><strong>Fecha entrada</strong></th>
<th width="50%" style="background-color:#006; text-align:center; color:#FFF"><strong>Comentarios entrada</strong></th>
<th width="50%" style="background-color:#006; text-align:center; color:#FFF"><strong>Estatus</strong></th>
<th width="50%" style="background-color:#006; text-align:center; color:#FFF"><strong>Fecha salida</strong></th>
<th width="50%" style="background-color:#006; text-align:center; color:#FFF"><strong>Comentarios salida</strong></th>
<th width="50%" style="background-color:#006; text-align:center; color:#FFF"><strong>Comentarios </strong></th>
</tr>
<?php
// Un proceso repetitivo para imprimir cada uno de los registros.
echo
"<tr>
<td bgcolor=\"#ededed\" align=\"center\">$row[suffix]</td>
<td bgcolor=\"#ededed\" align=\"center\">$row[order]</td>
<td bgcolor=\"#ededed\" align=\"center\">$row[item]</td>
<td bgcolor=\"#ededed\" align=\"center\">$row[co]</td>
<td bgcolor=\"#ededed\" align=\"center\">$row[responsible]</td>
<td bgcolor=\"#ededed\" align=\"center\">$raw[statusemb]</td>
<td bgcolor=\"#ededed\" align=\"center\">$raw[fechaemb]</td>
<td bgcolor=\"#ededed\" align=\"center\">$rew[statuscore]</td>
<td bgcolor=\"#ededed\" align=\"center\">$rew[fechacore]<td>
</tr>";
}
?>
</table>
</table>
</body>
</html>