$q = mysql_query("SELECT a.indhold AS com_indhold, a.id, a.titel,
b.indhold as traa_indhold
FROM community a, com_traade b
WHERE a.indhold LIKE '%$search%'
AND b.indhold LIKE '%search%' ORDER BY a.id, b.id DESC") or die(mysql_error());
while($row = mysql_fetch_array($q)) { ?>
<table width="100%"><td width="50%"><b>
<a title="Gå til side" href="traad.php?id=<?php echo $row['id']; ?>">
<font color="black"><u><?php echo $row['titel']; ?></font></a></b></td><tr>
<td width="50%">
<?php
$text = $row['com_indhold'];
$text = preg_replace('/</',' <',$text);
$text = preg_replace('/>/','> ',$text);
$desc = html_entity_decode(strip_tags($text));
$desc = preg_replace('/[\n\r\t]/',' ',$desc);
$desc = preg_replace('/ /',' ',$desc);
echo substr($desc, 0, 200); ?></font><br>
<font color="darkgray">
http://www.enetonline.dk/traad.php?id=<?php echo $row['id']; ?></font><hr></td></tr></table>
Jeg går ud fra ud fra at du linker til en traad.php fil at de felter der skal benyttes er fra den første tabel (community).