Ver Mensaje Individual
  #4 (permalink)  
Antiguo 01/12/2014, 15:55
slygerry
 
Fecha de Ingreso: diciembre-2014
Mensajes: 4
Antigüedad: 9 años, 5 meses
Puntos: 0
Exclamación Respuesta: Problema con pdf, dompdf

intente con ezpdf y me da otro error por favor ayudenme:

Código PHP:
<?php 
require_once('class.ezpdf.php');
$bd_host "localhost";
    
$bd_usuario "tienda";
    
$bd_password "online";
    
$bd_base "tiendaonline"
    
$id $_GET['id'];
        echo
$id;

    
$con mysql_connect($bd_host$bd_usuario$bd_password) or die("Error con la conexión");
    
mysql_select_db($bd_base$con) or die("Error al seleccionar db");

    
$sql="SELECT id, FROM productos id=$id";
        
$resSql=mysql_query($sql) or die("<br>Error consulta</br>".mysql_error());

$pdf = new Cezpdf('A4');
$pdf->selectFont('fonts/Helvetica.afm'); 

while(
$row=mysql_fetch_row($resSql)){
       
$data[]=array('id'=>$row[0],);
}
$titles=array('id'=>'id',);

$pdf->ezTable($data);
$pdf->ezStream();
?>

Error:

Error consulta
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 'FROM productos id=2' at line 1