Luego de complir una condena de 2 dias bien merecidos regreso al tema en cuestion hice esto:
Código php:
Ver originalecho "<tr>";
echo "<td>".$row['noticia_ID']."</td>";
echo "<td>".$row['noticiaTitulo']."</td>";
echo "<td>".$row['noticiaNoticia']."</td>";
echo "<td>".$row['club']."</td>";
?>
<input type="hidden" name="ids[<?=$row?>]" value="<?php echo $row
['noticia_ID']; ?>" />
<?php
?>
<td><a href="imprimir.php?id=<?php echo $row['noticia_ID']; ?>"><img src="imagenes/pdf.jpeg" align="middle"/></a> </td>
Este es el que me genera mi busqueda bien este es mi
generar_pdf.php
Código php:
Ver original<?php
include('pdf/class.ezpdf.php');
$ids = $_POST['ids'];
$queEmp = "SELECT * FROM noticias WHERE noticia_ID='$ids'";
for ($i=1;$i< count($ids);$i++){ $queEmp = $queEmp . "noticia_ID=$ids[$i] OR ";
}
$queEmp = $queEmp . "noticia_ID=$ids[$i]";
//$queEmp = "SELECT * FROM noticias Where club='$club'";
// creo un while para generar la tabla con sus campos
$ixx = 0;
$ixx = $ixx+1;
'num'=>'<b>Num</b>',
'noticiaTitulo'=>'<b>Titulo</b>',
'noticiaNoticia'=>'<b>Noticia</b>',
'club'=>'<b>Club</b>'
);
'shadeCol'=>array(0.9,0.9,0.9), 'xOrientation'=>'center',
'width'=>500
);
}
El problema que tengo es en la consulta no se si sera la correcta lo que quiero hacer es poder agarra todos eso ids 1, 5 ,8 ,9 ,16 por decir y pasarlos a mi pdf pero tengo este error:
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 'noticia_ID=' at line 1
este es mi problema