HI EVERYONE,
im currently doing a stat for our wapsite. Im a newbie in PHP there is a current script i'll just improvise it.
how can I output the data from our site using this codes,giving a day to day output until the present day.
Thanks For any help..
access query::
$sql_datos_accesos = "SELECT count(id) AS numAccesos FROM estadisticas WHERE fecha BETWEEN '".$fecha_1."' AND '".$fecha_2."' AND tipoEstadistica_id = '1' and siteEstadistica_id = '1'";
$rs_datos_accesos = mysql_query($sql_datos_accesos, $BBDD);
if (mysql_num_rows($rs_datos_accesos)!==0)
{
$consulta_accesos = mysql_fetch_array($rs_datos_accesos);
$num_accesos = $consulta_accesos["numAccesos"];
}
else
{
$num_accesos = 0;
}
downloads query::
$sql_datos_descargas1 = "SELECT count( id ) AS numDescargas, `tipoEstadistica_id`FROM `estadisticas`WHERE `fecha`BETWEEN '".$fecha_1."' AND '".$fecha_2."'AND `tipoEstadistica_id` > 1 AND `tipoEstadistica_id` < 21 GROUP BY tipoEstadistica_id";
$rs_datos_descargas = mysql_query($sql_datos_descargas, $BBDD);
if (mysql_num_rows($rs_datos_descargas)!==0)
{
while ($consulta_descargas = mysql_fetch_array($rs_datos_descargas))
{
$tipoEstadistica = $consulta_descargas1["tipoEstadistica_id"];
$num_descargas = $consulta_descargas1["numDescargas"];
}
}