2 tabeludtræk
Her er min kode:<?php
$sql = mysql_query("SELECT _klubber.navn, _profiler.* FROM _klubber, _profiler WHERE _klubber.navn = _profiler.klub ORDER BY _profiler.troje ASC");
$result = mysql_query("$sql")or die(mysql_error());
for ($i=1; $r = mysql_fetch_object($result); $i++){
echo"
<table width=75% align=center class=txt style=\"border-left: 1px solid #000000; border-top: 1px solid #000000; border-right: 1px solid #000000;\" cellspacing=0 cellpadding=2>
<tr>
<td align=left class=txt width=8%>$r->troje</td>
<td align=left class=txt width=32%><b><a href=http://www.footballworld.dk/profiler/sp_profiler.php?id=$r->vis_sp>$r->navn</b></td>
<td align=left class=txt width=20%><a href=http://www.footballworld.dk/profiler/kl_profiler.php?id=$r->klub_vis>$r->klub</td>
<td align=left class=txt width=20%>$r->land</td>
</tr>
</table>
";
}
?>
Men jeg får følgende fejlmeddelelse:
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 'Resource id #6' at line 1
----
Hvad er der galt?
