abrirConexao();
mysql_query("SET lc_time_names = 'pt_BR';");
$sql = "SELECT DATE_FORMAT(notData, '%d') dia, DATE_FORMAT(notData, '%b') mes, DATE_FORMAT(notData, '%Y') ano, notId, notTitulo, notUrl, notImg, notChapeu FROM Noticias";
$sql .= " WHERE notImg <> '' AND notDestaque = 1";
$sql .= " ORDER BY notData Desc LIMIT 0,4";
$result = mysql_query($sql);
if (mysql_num_rows($result) > 0) {
while ($row = mysql_fetch_array($result)) {?>
$notIdLast = $row['notId'];
}
}
mysql_free_result($result);
fecharConexao();?>
MAIS LIDAS
abrirConexao();
$sql = "SELECT notTitulo, notUrl, notChapeu FROM Noticias";
$sql .= " ORDER BY notAcessos Desc LIMIT 0,5";
$result = mysql_query($sql);
if (mysql_num_rows($result) > 0) {
$cont = 1;
while ($row = mysql_fetch_array($result)) {?>
$cont++;
}
}
mysql_free_result($result);
fecharConexao();?>
abrirConexao();
mysql_query("SET lc_time_names = 'pt_BR';");
$sql = "SELECT DATE_FORMAT(notData, '%d') dia, DATE_FORMAT(notData, '%b') mes, DATE_FORMAT(notData, '%Y') ano, notId, notTitulo, notUrl, notChapeu FROM Noticias";
$sql .= " WHERE notId < ".$notIdLast;
$sql .= " ORDER BY notData DESC, notId DESC LIMIT 0,6";
$result = mysql_query($sql);
if (mysql_num_rows($result) > 0) {
while ($row = mysql_fetch_array($result)) {?>
$notIdLast = $row['notId'];
}
}
mysql_free_result($result);
fecharConexao();?>
abrirConexao();
mysql_query("SET lc_time_names = 'pt_BR';");
$sql = "SELECT DATE_FORMAT(notData, '%d') dia, DATE_FORMAT(notData, '%b') mes, DATE_FORMAT(notData, '%Y') ano, notId, notTitulo, notUrl, notChapeu FROM Noticias";
$sql .= " WHERE notId < ".$notIdLast;
$sql .= " ORDER BY notData DESC, notId DESC LIMIT 0,6000";
$result = mysql_query($sql);
if (mysql_num_rows($result) > 0) {
while ($row = mysql_fetch_array($result)) {?>
$notIdLast = $row['notId'];
}
}
mysql_free_result($result);
fecharConexao();?>