este codigo lo utilizo en otra consulta y me funciona bien ahora quiero adecuarlo a este codigo
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,embobinado 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>Estilo</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\">$row[statusemb]</td>
<td bgcolor=\"#ededed\" align=\"center\">$row[fechaemb]<td>
</tr>";
}
?>
</table>
</table>
</body>
</html>