abrirConexao();
$sql = "SELECT notId, notTitulo, notUrl, notTexto, notImg, notChapeu, notDestaque FROM Noticias";
$sql .= " WHERE notImg <> '' AND notDestaque = 1";
$sql .= " ORDER BY notData Desc LIMIT 0,2";
$result = mysql_query($sql);
if (mysql_num_rows($result) > 0) {
while ($row = mysql_fetch_array($result)) {?>
$notId = $row['notId'];
}
}
mysql_free_result($result);
fecharConexao();?>
abrirConexao();
$sql = "SELECT notId, notTitulo, notUrl, notTexto, notImg, notChapeu, notDestaque FROM Noticias";
$sql .= " WHERE notId < ".$notId;
$sql .= " ORDER BY notData Desc LIMIT 0,4";
$result = mysql_query($sql);
if (mysql_num_rows($result) > 0) {
while ($row = mysql_fetch_array($result)) {?>
}
}
mysql_free_result($result);
fecharConexao();?>