Ver Mensaje Individual
  #6 (permalink)  
Antiguo 29/05/2008, 14:59
Avatar de T4ke0veR
T4ke0veR
 
Fecha de Ingreso: agosto-2007
Ubicación: Quito - Ecuador
Mensajes: 1.720
Antigüedad: 16 años, 8 meses
Puntos: 28
Respuesta: error mysql_fecth_assoc

me dice esto

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

Código PHP:
<?php    
include ('conect.php');   

$sqlex="SELECT `email`, COUNT(*) AS 'total', SUM(`monto`) AS 'suma' FROM `factura` GROUP BY `email`";   
$sql_execex=mysql_query($sqlex);  
while(
$rowex=mysql_fetch_assoc($sql_execex))   
{    
?> 
<?php  
$sqlexz
="SELECT * FROM clientes WHERE email=".$rowex['email']; 
$sql_execexz=mysql_query($sqlexz) or die(mysql_error());  
while(
$rowexz=mysql_fetch_assoc($sql_execexz)) { 
?>  

<table width="955" border="0" cellspacing="0" cellpadding="0">   
  <tr>   
    <td><table width="200" border="1" bgcolor="#999999">   

      

      <tr>   
        <td width="80" bgcolor="#FFFFFF"><?php echo $rowex['suma']; ?></td>   
          <td width="80" bgcolor="#FFFFFF"><?php echo $rowex['total']; ?></td>   
          <td width="40" bgcolor="#FFFFFF"><?php echo $rowexz['email']; ?></td>   
        </tr><?php }?>  
        <?php }?>       
      </table>   
      <p>&nbsp;</p> 
    <p>&nbsp;</p></td>   
  </tr>
__________________
Diseño gráfico, Web, imagen corporativa, publicidad ...