本文整理汇总了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);
示例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());
}
}
示例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);
示例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());
}
}
}
示例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);
示例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());
}
}
}
示例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());
示例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;";
示例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;";
示例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
示例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);
示例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 {
示例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++;
示例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());
示例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());