예제 #1
0
<?php

$qry = "";
$qry = $qry . " SELECT count, owloo_user_id, owloo_tweet_date FROM (SELECT count(owloo_tweet_date) as count, owloo_user_id, owloo_tweet_date";
$qry = $qry . " FROM owoo_tweet_data";
$qry = $qry . " WHERE owloo_user_id = '" . $update_id . "' AND owloo_tweet_date >= '" . get_twitter_date_30_day($update_id, 'owoo_tweet_data', 'owloo_user_id', 'owloo_tweet_date') . "'";
$qry = $qry . " group by owloo_tweet_date, owloo_user_id";
$qry = $qry . " Order by owloo_tweet_date Desc";
$qry = $qry . " Limit 0, 30) T Order by owloo_tweet_date ASC ";
$qrydata = mysql_query($qry);
$valoverall = '';
$xAxisCategories = "";
$seriesDataMin = 0;
$seriesDataMax = 0;
$ban = 1;
while ($fetchdata = mysql_fetch_array($qrydata)) {
    //Formatear fecha
    $auxformat = explode("-", $fetchdata['owloo_tweet_date']);
    $dia = $auxformat[2];
    $mes = getMes($auxformat[1], 'short');
    if ($ban == 1) {
        $valoverall .= $fetchdata["count"];
        $xAxisCategories .= "'" . $dia . " " . $mes . "'";
        $seriesDataMin = $fetchdata["count"];
        $seriesDataMax = $fetchdata["count"];
        $ban = 0;
    } else {
        $valoverall .= ',' . $fetchdata["count"];
        $xAxisCategories .= ",'" . $dia . " " . $mes . "'";
        if ($fetchdata["count"] < $seriesDataMin) {
            $seriesDataMin = $fetchdata["count"];
예제 #2
0
<?php

$qry = "";
$qry = $qry . " SELECT DISTINCT owloo_followers_count, owloo_user_twitter_id, owloo_updated_on";
$qry = $qry . " FROM owloo_daily_track";
$qry = $qry . " WHERE owloo_user_twitter_id = '" . $update_id . "' AND owloo_updated_on >= '" . get_twitter_date_30_day($update_id, 'owloo_daily_track', 'owloo_user_twitter_id', 'owloo_updated_on') . "'";
$qry = $qry . " ORDER BY owloo_updated_on ASC , owloo_followers_count DESC";
$qry = $qry . " LIMIT 0 , 35";
$que = mysql_query($qry);
$_valor_anterior = -1;
$_suma_crecimiento = 0;
$_count_suma_crecimiento = 0;
$seriesData = "";
//Estadística vertical. Cantidad de seguidores
$seriesDataMin = 0;
//Número mínimo de seguidores
$seriesDataMax = 0;
//Número máximo de seguidores
$xAxisCategories = "";
//Estadística horizontal. Fechas de los datos
$ban = 1;
//Bandera
$cont_num_data = mysql_num_rows($que);
while ($fila = mysql_fetch_assoc($que)) {
    //Formatear fecha
    $auxformat = explode("-", $fila['owloo_updated_on']);
    $dia = $auxformat[2];
    $mes = getMes($auxformat[1], 'short');
    if ($ban == 1) {
        $seriesData .= $fila['owloo_followers_count'];
        $xAxisCategories .= "'" . $dia . " " . $mes . "'";