PHP interesse |
|
Dit is de nieuwe code:
<table border="0" width="100%" style="border-top:1px solid #C0C0C0;border-left:1px solid #C0C0C0;border-right:1px solid #C0C0C0;" cellpadding="5" cellspacing="0">
<?
$woorden = array();
for($i=1;$i<=strlen($fInfo['woord']);$i++){
$woorden[] = substr($fInfo['woord'],0,$i);
}
$number=1;
$selectWords=mysql_query("SELECT * FROM documenten WHERE `woord` IN ".(implode(",",$woorden))." ORDER BY `datumtijd`"); // gewijzigd: implode(",",$woorden) ipv implode($woorden,",")
while($selectWords2=mysql_fetch_assoc($selectWords)){
?>
<tr>
<td width="5%" style="border-bottom:1px solid #C0C0C0;" align="center">
<? echo $number ?>
</td>
<td width="80%" style="border-bottom:1px solid #C0C0C0;border-left:1px solid #C0C0C0;">
<? echo $selectWords2['documentnaam'] ?>
</td>
<td width="15%" style="border-bottom:1px solid #C0C0C0;border-left:1px solid #C0C0C0;">
<a href="<? echo $selectWords2['documentlink'].$fInfo['woord'] ?>/" target="_blank">klik hier</a>
</td>
</tr>
<?
$number++;
}
?>
</table>
<table border="0" width="100%" style="border-top:1px solid #C0C0C0;border-left:1px solid #C0C0C0;border-right:1px solid #C0C0C0;" cellpadding="5" cellspacing="0"> <? for($i=1;$i<=strlen($fInfo['woord']);$i++){ $woorden[] = substr($fInfo['woord'],0,$i); } $number=1; $selectWords=mysql_query("SELECT * FROM documenten WHERE `woord` IN ".(implode(",",$woorden))." ORDER BY `datumtijd`"); // gewijzigd: implode(",",$woorden) ipv implode($woorden,",") ?> <tr> <td width="5%" style="border-bottom:1px solid #C0C0C0;" align="center"> </td> <td width="80%" style="border-bottom:1px solid #C0C0C0;border-left:1px solid #C0C0C0;"> <? echo $selectWords2['documentnaam'] ?> </td> <td width="15%" style="border-bottom:1px solid #C0C0C0;border-left:1px solid #C0C0C0;"> <a href=" <? echo $selectWords2['documentlink'].$fInfo['woord'] ?>/" target="_blank">klik hier</a> </td> </tr> <? $number++; } ?> </table>
Edit:
Nieuwe foutmelding:
Citaat: 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 ''H,H2,H2B' ORDER BY `datumtijd`' at line 1 |