Ver Mensaje Individual
  #9 (permalink)  
Antiguo 17/03/2011, 13:26
Avatar de bUllan9ebrio
bUllan9ebrio
 
Fecha de Ingreso: enero-2011
Ubicación: Chile
Mensajes: 1.128
Antigüedad: 14 años
Puntos: 128
Respuesta: ayuda porfavor amigos

Prueba de esta manera

Código PHP:
Ver original
  1. <?php
  2.  
  3. $bd_host = "localhost";
  4. $bd_usuario = "root";
  5. $bd_password = "";
  6. $bd_base = "test";
  7.  
  8. $con = mysql_connect($bd_host, $bd_usuario, $bd_password);
  9.  
  10. mysql_select_db($bd_base, $con);
  11.  
  12. echo "<table border='1'>
  13.  <tr>
  14.  <td>Enero</td>
  15.  <td>Febrero</td>
  16.  <td>Marzo</td>
  17.  <td>Abril</td>
  18.  <td>Mayo</td>
  19.  <td>Junio</td>
  20.  <td>Julio</td>
  21.  <td>Agosto</td>
  22.  <td>Septiembre</td>
  23.  <td>Octubre</td>
  24.  <td>Noviembre</td>
  25.  <td>Diciembre</td>
  26.  </tr>
  27.  <tr>";
  28.  
  29. for ( $i = 0 ; $i <= 12 ; $i ++)
  30. {
  31.     $sql=mysql_query("select COUNT(month(fecha)) cantidad from alguna where month(fecha) = $i",$con);
  32.     echo "<td>cantidad</td>";
  33. }
  34. echo "</tr>";
  35. ?>