<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<table width="736" border="1">
<tr>
<td>Nome:</td>
<td>Dia do Vencimento</td>
</tr>
<?php include ('conectar.php');
$mes_atual = date("m");
$ano_atual = date("Y");
$sql = mysql_query("SELECT * FROM faturas where status = 'off' AND MONTH(data_vencimento) = '$mes_atual' AND YEAR(data_vencimento) = '$ano_atual' GROUP BY DAY(data_vencimento)") or die(mysql_error());
while ($dados_faturas = mysql_fetch_array($sql)) {
list($ano,$mes,$dia) = explode("-",$dados_faturas[data_vencimento]);
$url = "index.php?pagina=Busca&chave=$dia/$mes/$ano&cat=data_vencimento&status_fatura=off";
$tabela_cliente = mysql_query("SELECT * FROM clientes");
while ($dados_clientes = mysql_fetch_array($tabela_cliente)) {
?>
<tr>
<td><?php echo $dados_clientes[nome]; ?></td>
<td><?php echo $dados_faturas[data_vencimento]; ?></td>
<?php }} ?></tr>
</table>
</body>
</html>
ele ta listando os campos duplicadamente!
quero listar assim
___________________________
Nome | Dia de Vencimento
Cliente 1 | 14/12/2010
Cliente 1 | 17/12/2010
Cliente 2 | 15/12/2010
-----------












