• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP getNumAudience函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中getNumAudience函数的典型用法代码示例。如果您正苦于以下问题:PHP getNumAudience函数的具体用法?PHP getNumAudience怎么用?PHP getNumAudience使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了getNumAudience函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: DATE_FORMAT

$next_id = $_SERVER['argv'][1];
$next_code = $_SERVER['argv'][2];
$total_language = $_SERVER['argv'][3];
$id_language = $_SERVER['argv'][4];
$key_language = $_SERVER['argv'][5];
if (!empty($next_id)) {
    $query = 'SELECT id_country FROM facebook_record_country_language_3_1 WHERE id_country = $1 AND id_language = $2 AND date = DATE_FORMAT(NOW(), \'%Y-%m-%d\');';
    $result = db_query($query, array($next_id, $id_language));
    if (!($row = $result->fetch(PDO::FETCH_ASSOC))) {
        $ban = 0;
        while ($ban == 0) {
            //Audiencia total
            $check_audience = false;
            $numAudience = NULL;
            while (!$check_audience) {
                $numAudience = getNumAudience($next_code, $key_language, $accessToken, $accountId, $pageId, $pageName);
                if (!$numAudience) {
                    nextAccessToken();
                } else {
                    $check_audience = true;
                }
            }
            if (is_numeric($numAudience)) {
                $query = 'INSERT INTO facebook_record_country_language_3_1 VALUES($1, $2, $3, NOW());';
                $values = array($next_id, $id_language, $numAudience);
                $res = db_query($query, $values, 1);
                if ($res) {
                    $ban = 1;
                }
            } else {
                send_email('country_language_3_1', 'Owloo ERROR - Pais LANGUAGE - ' . $next_id . ' - 3.1', 'ERROR en la captura de datos.', true, 'Captura de datos - Pais LANGUAGE - ID = ' . $_SERVER['argv'][1] . ' => ' . $numAudience);
开发者ID:newbacknew,项目名称:owloo.com,代码行数:31,代码来源:record_country_language.php


示例2: getAccessToken

            //Trata de obtener un nuevo access_token
        }
    }
    return $numAudience;
}
/***************************************** GET POR ACTIVIDADES ********************************************************/
echo '<br>Pea hae: ' . ($accessToken = getAccessToken());
$query = "SELECT id_country, code FROM country WHERE id_country >= 181 AND id_country <= 200 ORDER BY 1 LIMIT 1;";
$que = mysql_query($query, $conexion) or die(mysql_error());
$sql_value = "";
while ($fila = mysql_fetch_assoc($que)) {
    $ban = 0;
    while ($ban == 0) {
        $sql_value = "";
        for ($i = 0; $i < count($actividades); $i++) {
            $sql_value .= ',' . getNumAudience($fila["code"], $actividades[$i]['actividad'], $accessToken);
        }
        //Insertamos los datos
        $sql = "INSERT INTO record_country_for_user_preference VALUES(null, " . $fila['id_country'] . ", now() " . $sql_value . ");";
        $res2 = mysql_query($sql, $conexion) or die(mysql_error());
        $ultimoRegistro = mysql_insert_id();
        //VERIFICA SI SE HA INSERTADO CORRECTAMENTE
        $query = "SELECT id_user_preference FROM record_country_for_user_preference WHERE id_user_preference = " . $ultimoRegistro . " AND category_1 is not null AND category_2 is not null AND category_3 is not null AND category_4 is not null AND category_5 is not null AND category_6 is not null AND category_7 is not null AND category_8 is not null AND category_9 is not null AND category_10 is not null AND category_11 is not null AND category_12 is not null AND category_13 is not null AND category_14 is not null AND category_15 is not null AND category_16 is not null AND category_17 is not null AND category_18 is not null AND category_19 is not null AND category_20 is not null AND category_21 is not null AND category_22 is not null AND category_23 is not null AND category_24 is not null AND category_25 is not null AND category_26 is not null AND category_27 is not null AND category_28 is not null AND category_29 is not null AND category_30 is not null AND category_31 is not null AND category_32 is not null AND category_33 is not null;";
        $que2 = mysql_query($query, $conexion) or die(mysql_error());
        if ($fila2 = mysql_fetch_assoc($que2)) {
            $ban = 1;
        } else {
            $sql = "DELETE FROM record_country_for_user_preference WHERE id = " . $ultimoRegistro . ";";
            $res2 = mysql_query($sql, $conexion) or die(mysql_error());
        }
    }
开发者ID:newbacknew,项目名称:owloo.com,代码行数:31,代码来源:record_country_activities_10.php


示例3: while

 //Audiencia total mujeres
 $check_audience = false;
 $numAudienceFemale = NULL;
 while (!$check_audience) {
     $numAudienceFemale = getNumAudience($next_code, $age_min, $age_max, "2", $accessToken, $accountId, $pageId, $pageName);
     if (!$numAudienceFemale) {
         nextAccessToken();
     } else {
         $check_audience = true;
     }
 }
 //Audiencia total hombres
 $check_audience = false;
 $numAudienceMale = NULL;
 while (!$check_audience) {
     $numAudienceMale = getNumAudience($next_code, $age_min, $age_max, "1", $accessToken, $accountId, $pageId, $pageName);
     if (!$numAudienceMale) {
         nextAccessToken();
     } else {
         $check_audience = true;
     }
 }
 if (is_numeric($numAudience) && is_numeric($numAudienceMale) && is_numeric($numAudienceFemale)) {
     $query = 'INSERT INTO facebook_record_country_age_3_1 VALUES($1, $2, $3, $4, $5, NOW());';
     $values = array($next_id, $age_id, $numAudience, $numAudienceFemale, $numAudienceMale);
     $res = db_query($query, $values, 1);
     if ($res) {
         $ban = 1;
     }
 } else {
     send_email('country_age_3_1', 'Owloo ERROR - Pais AGE - ' . $next_id . ' - 3.1', 'ERROR en la captura de datos.', true, 'Captura de datos - Pais AGE - ID = ' . $_SERVER['argv'][1] . ' => ' . $numAudience . ' - ' . $numAudienceFemale . ' - ' . $numAudienceMale);
开发者ID:newbacknew,项目名称:owloo.com,代码行数:31,代码来源:record_country_age.php


示例4: getAccessToken

        }
    }
    return $numAudience;
}
/***************************************** GET TOTALES ********************************************************/
$accessToken = getAccessToken();
$query = "SELECT id_country, code FROM country ORDER BY 1;";
$que = mysql_query($query, $conexion) or die(mysql_error());
$sql_value = "";
while ($fila = mysql_fetch_assoc($que)) {
    $ban = 0;
    while ($ban == 0) {
        $sql_value = "";
        $sql_value .= getNumAudience($fila["code"], "", $accessToken);
        $sql_value .= ',' . getNumAudience($fila["code"], "2", $accessToken);
        $sql_value .= ',' . getNumAudience($fila["code"], "1", $accessToken);
        //Insertamos los datos
        $sql = "INSERT INTO record_country(id_country, date, total_user, total_female, total_male) VALUES (" . $fila['id_country'] . ", DATE_FORMAT(now(),'%Y-%m-%d'), " . $sql_value . ");";
        $res2 = mysql_query($sql, $conexion) or die(mysql_error());
        $ultimoRegistro = mysql_insert_id();
        //VERIFICA SI SE HA INSERTADO CORRECTAMENTE
        $query = "SELECT id_country FROM record_country WHERE id_historial_pais = " . $ultimoRegistro . " AND total_user is not null AND total_female is not null AND total_male is not null;";
        $que2 = mysql_query($query, $conexion) or die(mysql_error());
        if ($fila2 = mysql_fetch_assoc($que2)) {
            $ban = 1;
        } else {
            $sql = "DELETE FROM record_country WHERE id_historial_pais = " . $ultimoRegistro . ";";
            $res2 = mysql_query($sql, $conexion) or die(mysql_error());
        }
    }
}
开发者ID:newbacknew,项目名称:owloo.com,代码行数:31,代码来源:record_country_temp.php


示例5: while

 //Audiencia total mujeres
 $check_audience = false;
 $numAudienceFemale = NULL;
 while (!$check_audience) {
     $numAudienceFemale = getNumAudience($next_code, "2", $key_relationship, $accessToken, $accountId, $pageId, $pageName);
     if (!$numAudienceFemale) {
         nextAccessToken();
     } else {
         $check_audience = true;
     }
 }
 //Audiencia total hombres
 $check_audience = false;
 $numAudienceMale = NULL;
 while (!$check_audience) {
     $numAudienceMale = getNumAudience($next_code, "1", $key_relationship, $accessToken, $accountId, $pageId, $pageName);
     if (!$numAudienceMale) {
         nextAccessToken();
     } else {
         $check_audience = true;
     }
 }
 if (is_numeric($numAudience) && is_numeric($numAudienceMale) && is_numeric($numAudienceFemale)) {
     $query = 'INSERT INTO facebook_record_country_relationship_3_1 VALUES($1, $2, $3, $4, $5, NOW());';
     $values = array($next_id, $id_relationship, $numAudience, $numAudienceFemale, $numAudienceMale);
     $res = db_query($query, $values, 1);
     if ($res) {
         $ban = 1;
     }
 } else {
     send_email('country_relationship_3_1', 'Owloo ERROR - Pais RELATIONSHIP - ' . $next_id . ' - 3.1', 'ERROR en la captura de datos.', true, 'Captura de datos - Pais RELATIONSHIP - ID = ' . $_SERVER['argv'][1] . ' => ' . $numAudience . ' - ' . $numAudienceFemale . ' - ' . $numAudienceMale);
开发者ID:newbacknew,项目名称:owloo.com,代码行数:31,代码来源:record_country_relationship.php


示例6: while

$sql_value = "";
while ($fila = mysql_fetch_assoc($que)) {
    $ban = 0;
    while ($ban == 0) {
        $sql_value = "";
        //Edades
        for ($i = 0; $i < count($rangoEdades); $i++) {
            $sql_value .= getNumAudience($fila["code"], "", $rangoEdades[$i]['min'], $rangoEdades[$i]['max'], 'null', '', 'false', $accessToken) . ',';
        }
        //Lenguajes
        for ($i = 0; $i < count($idiomas); $i++) {
            $sql_value .= getNumAudience($fila["code"], "", '13', '65', 'null', $idiomas[$i]['code'], 'true', $accessToken) . ',';
        }
        //Relaciones
        for ($i = 0; $i < count($relaciones); $i++) {
            $sql_value .= getNumAudience($fila["code"], "", '13', '65', $relaciones[$i]['code'], '', 'true', $accessToken) . ',';
        }
        //Insertamos los datos
        $sql = "INSERT INTO record_country_for_age_language VALUES(null, " . $fila['id_country'] . ", " . $sql_value . " now());";
        $res2 = mysql_query($sql, $conexion) or die(mysql_error());
        $ultimoRegistro = mysql_insert_id();
        $query = "SELECT id FROM record_country_for_age_language WHERE id = " . $ultimoRegistro . " AND rango_13_15 is not null AND rango_16_17 is not null AND rango_18_28 is not null AND rango_29_34 is not null AND rango_35_44 is not null AND rango_45_54 is not null AND rango_55_64 is not null AND rango_65_65 is not null AND language_spanish is not null AND language_english is not null AND language_chinese is not null AND language_portuguese is not null AND language_hindi is not null AND relationship_single is not null AND relationship_has_a_relationship is not null AND relationship_married is not null;";
        $que2 = mysql_query($query, $conexion) or die(mysql_error());
        if ($fila2 = mysql_fetch_assoc($que2)) {
            $ban = 1;
        } else {
            $sql = "DELETE FROM record_country_for_age_language WHERE id = " . $ultimoRegistro . ";";
            $res2 = mysql_query($sql, $conexion) or die(mysql_error());
        }
    }
}
开发者ID:newbacknew,项目名称:owloo.com,代码行数:31,代码来源:bk_record_country_age_language_relationship.php


示例7: while

 $numAudienceFemale = NULL;
 while (!$check_audience) {
     $numAudienceFemale = getNumAudience($fila["code"], "2", $accessToken, $accountId);
     if (!$numAudienceFemale) {
         nextAccessToken();
         $conexion = mysql_connect("localhost", "owloo_admin", "fblatamx244") or die(mysql_error());
         mysql_select_db("owloo_owloo", $conexion) or die(mysql_error());
     } else {
         $check_audience = true;
     }
 }
 //Audiencia total hombres
 $check_audience = false;
 $numAudienceMale = NULL;
 while (!$check_audience) {
     $numAudienceMale = getNumAudience($fila["code"], "1", $accessToken, $accountId);
     if (!$numAudienceMale) {
         nextAccessToken();
         $conexion = mysql_connect("localhost", "owloo_admin", "fblatamx244") or die(mysql_error());
         mysql_select_db("owloo_owloo", $conexion) or die(mysql_error());
     } else {
         $check_audience = true;
     }
 }
 $sql_value = "";
 $sql_value .= $numAudience;
 $sql_value .= ',' . $numAudienceFemale;
 $sql_value .= ',' . $numAudienceMale;
 //Insertamos los datos
 $sql = "INSERT INTO record_country(id_country, date, total_user, total_female, total_male) VALUES (" . $fila['id_country'] . ", DATE_FORMAT(now(),'%Y-%m-%d'), " . $sql_value . ");";
 $res2 = mysql_query($sql, $conexion) or die(mysql_error());
开发者ID:newbacknew,项目名称:owloo.com,代码行数:31,代码来源:BK_18-03-13_record_country.php


示例8: nextAccessToken

         if (!$numAudience) {
             nextAccessToken();
             $conexion = mysql_connect("localhost", "owloo_admin", "fblatamx244") or die(mysql_error());
             mysql_select_db("owloo_owloo", $conexion) or die(mysql_error());
         } else {
             $check_audience = true;
         }
     }
     $sql_value .= $numAudience . ',';
 }
 //Educación
 for ($i = 0; $i < count($educacion); $i++) {
     $check_audience = false;
     $numAudience = NULL;
     while (!$check_audience) {
         $numAudience = getNumAudience($fila["code"], "", '13', '65', 'null', '', 'true', $educacion[$i]['code'], $accessToken, $accountId);
         if (!$numAudience) {
             nextAccessToken();
             $conexion = mysql_connect("localhost", "owloo_admin", "fblatamx244") or die(mysql_error());
             mysql_select_db("owloo_owloo", $conexion) or die(mysql_error());
         } else {
             $check_audience = true;
         }
     }
     $sql_value .= $numAudience . ',';
 }
 //Insertamos los datos
 $sql = "INSERT INTO record_country_for_age_language VALUES(null, " . $fila['id_country'] . ", " . $sql_value . " now());";
 $res2 = mysql_query($sql, $conexion) or die(mysql_error());
 $ultimoRegistro = mysql_insert_id();
 $query = "SELECT id FROM record_country_for_age_language WHERE id = " . $ultimoRegistro . "\n\t\t AND rango_13_15 is not null\n\t\t AND rango_16_17 is not null\n\t\t AND rango_18_28 is not null\n\t\t AND rango_29_34 is not null\n\t\t AND rango_35_44 is not null\n\t\t AND rango_45_54 is not null\n\t\t AND rango_55_64 is not null\n\t\t AND rango_65_65 is not null\n\t\t AND language_spanish is not null\n\t\t AND language_english is not null\n\t\t AND language_chinese is not null\n\t\t AND language_portuguese is not null\n\t\t AND language_hindi is not null\n\t\t AND language_frances is not null\n\t\t AND language_aleman is not null\n\t\t AND language_italiano is not null\n\t\t AND language_ruso is not null\n\t\t AND language_japones is not null\n\t\t AND language_coreano is not null\n\t\t AND language_holandes is not null\n\t\t AND language_arabe is not null\n\t\t AND language_bengali is not null\n\t\t AND language_turco is not null\n\t\t AND language_malayo is not null\n\t\t AND language_polaco is not null\n\t\t AND language_indonesio is not null\n\t\t AND language_filipino is not null\n\t\t AND language_tailandes is not null\n\t\t AND language_vietnamita is not null\n\t\t AND relationship_single is not null\n\t\t AND relationship_has_a_relationship is not null\n\t\t AND relationship_married is not null\n\t\t AND relationship_comprometido is not null\n\t\t AND education_en_la_escuela_secundaria is not null\n\t\t AND education_en_la_universidad is not null\n\t\t AND education_con_estudios_universitarios is not null;";
开发者ID:newbacknew,项目名称:owloo.com,代码行数:31,代码来源:record_country_age_language_relationship_1.php


示例9: while

 $numAudience = NULL;
 while (!$check_audience) {
     $numAudience = getNumAudience($fila["code"], "2", $fila["key_city"], str_replace(' ', '%20', $fila["name"]), $accessToken, $accountId);
     if (!$numAudience) {
         nextAccessToken();
         $conexion = mysql_connect("localhost", "owloo_admin", "fblatamx244") or die(mysql_error());
         mysql_select_db("owloo_owloo", $conexion) or die(mysql_error());
     } else {
         $check_audience = true;
     }
 }
 $sql_value .= ',' . $numAudience;
 $check_audience = false;
 $numAudience = NULL;
 while (!$check_audience) {
     $numAudience = getNumAudience($fila["code"], "1", $fila["key_city"], str_replace(' ', '%20', $fila["name"]), $accessToken, $accountId);
     if (!$numAudience) {
         nextAccessToken();
         $conexion = mysql_connect("localhost", "owloo_admin", "fblatamx244") or die(mysql_error());
         mysql_select_db("owloo_owloo", $conexion) or die(mysql_error());
     } else {
         $check_audience = true;
     }
 }
 $sql_value .= ',' . $numAudience;
 //Insertamos los datos
 $sql = "INSERT INTO record_city(id_city, date, total_user, total_female, total_male) VALUES (" . $fila['id_city'] . ", DATE_FORMAT(" . $date_insert . ",'%Y-%m-%d'), " . $sql_value . ");";
 $res2 = mysql_query($sql, $conexion) or die(mysql_error());
 $ultimoRegistro = mysql_insert_id();
 //VERIFICA SI SE HA INSERTADO CORRECTAMENTE
 /*$query = "SELECT id_city FROM record_city WHERE id_historial_city = ".$ultimoRegistro." AND total_user is not null AND total_female is not null AND total_male is not null;"; 
开发者ID:newbacknew,项目名称:owloo.com,代码行数:31,代码来源:record_city_aux.php


示例10: nextAccessToken

/***************************************** GET POR ACTIVIDADES ********************************************************/
nextAccessToken();
$conexion = mysql_connect("localhost", "owloo_admin", "fblatamx244") or die(mysql_error());
mysql_select_db("owloo_owloo", $conexion) or die(mysql_error());
$query = "SELECT id_country, code FROM country WHERE id_country >= 101 AND id_country <= 120 ORDER BY 1;";
$que = mysql_query($query, $conexion) or die(mysql_error());
$sql_value = "";
while ($fila = mysql_fetch_assoc($que)) {
    $ban = 0;
    while ($ban == 0) {
        $sql_value = "";
        for ($i = 0; $i < count($actividades); $i++) {
            $check_audience = false;
            $numAudience = NULL;
            while (!$check_audience) {
                $numAudience = getNumAudience($fila["code"], $actividades[$i]['actividad'], $accessToken, $accountId);
                if (!$numAudience) {
                    nextAccessToken();
                    $conexion = mysql_connect("localhost", "owloo_admin", "fblatamx244") or die(mysql_error());
                    mysql_select_db("owloo_owloo", $conexion) or die(mysql_error());
                } else {
                    $check_audience = true;
                }
            }
            $sql_value .= ',' . $numAudience;
        }
        //Insertamos los datos
        $sql = "INSERT INTO record_country_for_user_preference VALUES(null, " . $fila['id_country'] . ", now() " . $sql_value . ");";
        $res2 = mysql_query($sql, $conexion) or die(mysql_error());
        $ultimoRegistro = mysql_insert_id();
        //VERIFICA SI SE HA INSERTADO CORRECTAMENTE
开发者ID:newbacknew,项目名称:owloo.com,代码行数:31,代码来源:record_country_activities_6.php


示例11: DATE_FORMAT

if (!empty($next_id)) {
    if ($check_if_exist) {
        $query = 'SELECT id_country FROM facebook_record_country_generation_3_1 WHERE id_country = $1 AND id_generation = $2 AND date = DATE_FORMAT(NOW(), \'%Y-%m-%d\');';
        $que = db_query($query, array($next_id, $id_generation));
        if ($row = mysql_fetch_assoc($que)) {
            die;
        }
    }
    $cont = 0;
    $ban = 0;
    while ($ban == 0 && $cont < 5) {
        //Audiencia total
        $check_audience = false;
        $numAudience = NULL;
        while (!$check_audience) {
            $numAudience = getNumAudience($next_code, $key_generation, $accessToken, $accountId, $pageId, $pageName);
            if (!$numAudience) {
                nextAccessToken();
            } else {
                $check_audience = true;
            }
        }
        if (is_numeric($numAudience)) {
            $query = 'INSERT INTO facebook_record_country_generation_3_1 VALUES($1, $2, $3, NOW());';
            $values = array($next_id, $id_generation, $numAudience);
            $res = db_query($query, $values, 1);
            if ($res) {
                $ban = 1;
            }
        } else {
            send_email('country_generation_3_1', 'Owloo ERROR - Pais GENERATION - ' . $next_id . ' - 3.1', 'ERROR en la captura de datos.', true, 'Captura de datos - Pais GENERATION - ID = ' . $_SERVER['argv'][1] . ' => ' . $numAudience);
开发者ID:newbacknew,项目名称:owloo.com,代码行数:31,代码来源:record_country_generation.php


示例12: while

 //Audiencia total mujeres
 $check_audience = false;
 $numAudienceFemale = NULL;
 while (!$check_audience) {
     $numAudienceFemale = getNumAudience($next_code, "2", $key_comportamiento, $accessToken, $accountId, $pageId, $pageName);
     if (!$numAudienceFemale) {
         nextAccessToken();
     } else {
         $check_audience = true;
     }
 }
 //Audiencia total hombres
 $check_audience = false;
 $numAudienceMale = NULL;
 while (!$check_audience) {
     $numAudienceMale = getNumAudience($next_code, "1", $key_comportamiento, $accessToken, $accountId, $pageId, $pageName);
     if (!$numAudienceMale) {
         nextAccessToken();
     } else {
         $check_audience = true;
     }
 }
 if (is_numeric($numAudience) && is_numeric($numAudienceMale) && is_numeric($numAudienceFemale)) {
     //Insertamos los datos
     $query = 'INSERT INTO facebook_record_country_comportamiento_3_1 VALUES($1, $2, $3, $4, $5, NOW());';
     $values = array($next_id, $id_comportamiento, $numAudience, $numAudienceFemale, $numAudienceMale);
     $res = db_query($query, $values, 1);
     if ($res) {
         $ban = 1;
     }
 } else {
开发者ID:newbacknew,项目名称:owloo.com,代码行数:31,代码来源:record_country_comportamiento.php


示例13: db_query

$total_interest = $_SERVER['argv'][3];
$id_interest = $_SERVER['argv'][4];
$key_interest = $_SERVER['argv'][5];
if (!empty($next_id)) {
    /*$query = 'SELECT id_city FROM facebook_record_city_interest_3_1 WHERE id_city = $1 AND id_interest = $2 AND date = DATE_FORMAT(NOW(), \'%Y-%m-%d\');';
      $que = db_query($query, array($next_id, $id_interest));
      
      if(!$row = mysql_fetch_assoc($que)){*/
    $cont = 0;
    $ban = 0;
    while ($ban == 0 && $cont < 5) {
        //Audiencia total
        $check_audience = false;
        $numAudience = NULL;
        while (!$check_audience) {
            $numAudience = getNumAudience($next_code, "", $key_interest, $accessToken, $accountId, $pageId, $pageName);
            if (!$numAudience) {
                nextAccessToken();
            } else {
                $check_audience = true;
            }
        }
        if (is_numeric($numAudience)) {
            $query = 'INSERT INTO facebook_record_city_interest_3_1 VALUES($1, $2, $3, NOW());';
            $values = array($next_id, $id_interest, $numAudience);
            $res = db_query($query, $values, 1);
            $ban = 1;
        } else {
            send_email('city_interest_3_1', 'Owloo ERROR - Ciudad INTEREST - ' . $next_id . ' - 3.1', 'ERROR en la captura de datos.', true, 'Captura de datos - Ciudad INTEREST - ID = ' . $_SERVER['argv'][1] . ' => ' . $numAudience);
        }
        $cont++;
开发者ID:newbacknew,项目名称:owloo.com,代码行数:31,代码来源:record_city_interest.php


示例14: DATE_FORMAT

    }
    if ($ban == 0) {
        $sql = "UPDATE record_country SET total_female = NULL WHERE date = DATE_FORMAT(now(),'%Y-%m-%d');";
        $res2 = mysql_query($sql, $conexion) or die(mysql_error());
    }
}
/***************************************** FIN GET MUJERES ********************************************************/
sleep(5);
/***************************************** GET HOMBRES ********************************************************/
$ban = 0;
while ($ban == 0) {
    $accessToken = getAccessToken();
    $query = "SELECT id_country, code FROM country;";
    $que = mysql_query($query, $conexion) or die(mysql_error());
    while ($fila = mysql_fetch_assoc($que)) {
        $num = getNumAudience($fila["code"], "1", $accessToken);
        $sql = "UPDATE record_country SET total_male = " . $num . " WHERE id_country = " . $fila['id_country'] . " AND date = DATE_FORMAT(now(),'%Y-%m-%d');";
        $res2 = mysql_query($sql, $conexion) or die(mysql_error());
    }
    //VERIFICA
    $num_register = 0;
    $num_country = 0;
    $query = "SELECT count(*) num_register FROM record_country WHERE date = DATE_FORMAT(now(),'%Y-%m-%d') AND total_male is not null;";
    $que = mysql_query($query, $conexion) or die(mysql_error());
    if ($fila = mysql_fetch_assoc($que)) {
        $num_register = $fila['num_register'];
    } else {
        $ban = 0;
    }
    $query = "SELECT count(*) num_country FROM country;";
    $que = mysql_query($query, $conexion) or die(mysql_error());
开发者ID:newbacknew,项目名称:owloo.com,代码行数:31,代码来源:record_country(28-01-13).php


示例15: while

 $numAudienceFemale = NULL;
 while (!$check_audience) {
     $numAudienceFemale = getNumAudience($fila["code"], "2", $accessToken, $accountId, $pageId, $pageName);
     if (!$numAudienceFemale) {
         nextAccessToken();
         $conexion = mysql_connect("localhost", "owloo_admin", "fblatamx244") or die(mysql_error());
         mysql_select_db("owloo_owloo", $conexion) or die(mysql_error());
     } else {
         $check_audience = true;
     }
 }
 //Audiencia total hombres
 $check_audience = false;
 $numAudienceMale = NULL;
 while (!$check_audience) {
     $numAudienceMale = getNumAudience($fila["code"], "1", $accessToken, $accountId, $pageId, $pageName);
     if (!$numAudienceMale) {
         nextAccessToken();
         $conexion = mysql_connect("localhost", "owloo_admin", "fblatamx244") or die(mysql_error());
         mysql_select_db("owloo_owloo", $conexion) or die(mysql_error());
     } else {
         $check_audience = true;
     }
 }
 $sql_value = "";
 $sql_value .= $numAudience;
 $sql_value .= ',' . $numAudienceFemale;
 $sql_value .= ',' . $numAudienceMale;
 //Insertamos los datos
 $sql = "INSERT INTO record_country(id_country, date, total_user, total_female, total_male) VALUES (" . $fila['id_country'] . ", DATE_FORMAT(now(),'%Y-%m-%d'), " . $sql_value . ");";
 $res2 = mysql_query($sql, $conexion) or die(mysql_error());
开发者ID:newbacknew,项目名称:owloo.com,代码行数:31,代码来源:record_country.php



注:本文中的getNumAudience函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP getNumImages函数代码示例发布时间:2022-05-15
下一篇:
PHP getNumAlbums函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap