Ver Mensaje Individual
  #5 (permalink)  
Antiguo 23/12/2009, 15:07
Jiam
 
Fecha de Ingreso: diciembre-2009
Mensajes: 3
Antigüedad: 14 años, 4 meses
Puntos: 0
Respuesta: Reporte de Fechas

Bueno encontré la solución después de tanto intentar.

$consulta = mysql_query("select week(fecha) as semana from tabla group by semana");

while($row = mysql_fetch_array($consulta)){

$consulta2 = mysql_query("select *, week(fecha) from tabla where week(fecha) = '".$row[0]."'
group by IdPrincipal");

while($row2 = mysql_fetch_array($consulta2)){
echo"<br><br>".$row2[1];
echo"<br>".$row2[9];
echo"<br>".$row2[10];
}
echo"<br>Semana";
}