Ver Mensaje Individual
  #7 (permalink)  
Antiguo 05/05/2007, 08:40
Avatar de sumolari
sumolari
 
Fecha de Ingreso: mayo-2006
Ubicación: localhost
Mensajes: 1.367
Antigüedad: 18 años
Puntos: 18
Re: crear un pdf, el texto sacado de la bd

¡¡¡ Gracias, ya funciona !!!

Lo he probado y va muy bien, pero no consigo que coja los datos de otra tabla de mi BD.
Código PHP:
    //Datos
    
$fill=0;

    
$Sql "SELECT * FROM read ORDER BY id ASC";
    
$Query mysql_query($Sql);
    
    
//Bucle para generar los datos
    
while($row mysql_fetch_array($Query))
        {
        
$this->Cell($w[0],6,$row['text'],'LR',0,'C',$fill);        
        
$this->Ln();
        
$fill=!$fill;
        

        
        }    
    
$this->Cell(array_sum($w),0,'','T');
    }

}
//============================================================== 
El error que da es
Cita:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in e:\servidor\www\ffextremo_cms\create_pdf.php on line 90

Warning: Cannot modify header information - headers already sent by (output started at e:\servidor\www\ffextremo_cms\create_pdf.php:90) in e:\servidor\www\ffextremo_cms\fphp\fpdf.php on line 1022
FPDF error: Some data has already been output to browser, can't send PDF file
También he intentado cambiar ORDER BY id ASC por WHERE Campo1 = %s y ha mostrado el mismo error.

Última edición por sumolari; 05/05/2007 a las 09:02