本文整理汇总了PHP中informarExito函数的典型用法代码示例。如果您正苦于以下问题:PHP informarExito函数的具体用法?PHP informarExito怎么用?PHP informarExito使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了informarExito函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: mysql_query
$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());
}
}
}
/***************************************** FIN GET TOTALES ********************************************************/
/********************************** Verificación de finalización *************************************************/
//Cantidad total de países
$query = "SELECT COUNT(*) cantidad FROM country;";
$que = mysql_query($query, $conexion) or die(mysql_error());
$cantidadPais = 0;
if ($fila = mysql_fetch_assoc($que)) {
$cantidadPais = $fila['cantidad'];
}
//Cantidad de filas insertadas
$query = "SELECT COUNT(*) cantidad FROM `record_country` WHERE date = DATE_FORMAT(now(), '%Y-%m-%d');";
$que = mysql_query($query, $conexion) or die(mysql_error());
if ($fila = mysql_fetch_assoc($que)) {
if ($fila['cantidad'] == $cantidadPais) {
informarExito();
} else {
informarError();
}
}
/******************************* FIN - Verificación de finalización **********************************************/
mysql_close($conexion);
示例2: Date
$qry = $qry . " '" . Date("Y-m-d") . "')";
mysql_query($qry);
$ban_success = true;
$cont++;
}
}
} else {
$informe_errores .= "\n \t\t\t\tERROR: " . $fetch_cntr["owloo_screen_name"] . " - " . $cont;
//echo '<br/>ERROR: '.$fetch_cntr["owloo_screen_name"].' - '.$cont;
$ban_success = true;
$cont++;
}
}
}
$informe_errores .= "\n \tFIN! " . date("H:i:s");
//echo '<br/>FIN!'.date("H:i:s");
//echo $informe_errores;
function informarExito($text)
{
//Enviar aviso por email
$para = 'mmolinas@latamclick.com';
$titulo = 'Owloo - Twitter seguidores';
$mensaje = 'El script de captura de seguidores en el twitter se ha ejecutado exitosamente!!!<br><br>' . $text;
$cabeceras = 'From: dev@owloo.com' . "\r\n";
mail($para, $titulo, $mensaje, $cabeceras);
}
informarExito($informe_errores);
/*$f = fopen('xxx.txt', 'w+');
fwrite($f, $informe_errores);
fclose($f);*/
error_log(' Twitter cronjob (f): ' . date('d m Y H:i:s'));