sql SELECT probleempje
Geplaatst: 19 sep 2004, 19:32
Het gaat om deze site 'http://skateit.netrulon.com' en deze pagina 'http://skateit.netrulon.com/spotlist.php'.
Dit is de hele php file :
Dit is van regel 38 tot en met 47 :
Wat is er fout?
Dit is de hele php file :
Code: Selecteer alles
<?php
define('IN_PHPBB', true);
$phpbb_root_path = './'; // <--
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
?>
<html>
<head>
<meta name="generator" content="Namo WebEditor v5.0">
</head>
<body bgcolor="#CC9966" text="black" link="blue" vlink="purple" alink="red">
<table cellpadding="0" cellspacing="0" width="991">
<tr>
<td width="138" height="30" bgcolor="#990000">
<p> <b><font color="#CC6600">Navigatie</font></b></p>
</td>
<td width="37" height="420" rowspan="6">
<p> </p>
</td>
<td width="816" height="30" bgcolor="#990000">
<p> <b><font color="#CC6600">Nieuws</font></b></p>
</td>
</tr>
<tr>
<td width="138" height="113" valign="top" bgcolor="#996600">
<p><? include('navigation.php') ?></p>
</td>
<td width="816" height="390" valign="top" rowspan="5" bgcolor="#996600">
<p><?
$sql= "SELECT id,spot,location FROM phpbb_spots ORDER BY id desc limit 50"
";
$res = mysql_query($query);
while($data = @mysql_fetch_array($res))
{
echo " <a href="spot.php?id=$data["id"]."">".$data['spot']."</a><br>";
}
?>
</p>
</td>
</tr>
<tr>
<td width="138" height="25" valign="top" bgcolor="#990000">
<p> <b><font color="#CC6600">Links</font></b></p>
</td>
</tr>
<tr>
<td width="138" height="87" valign="top" bgcolor="#996600">
<p><? include('links.php') ?></p>
</td>
</tr>
<tr>
<td width="138" height="23" valign="top" bgcolor="#990000" align="center">
<p><b><font color="#CC9900">Latest event</font></b></p>
</td>
</tr>
<tr>
<td width="138" height="142" valign="top" bgcolor="#996600">
<p> Nog geen evenementen bekend.
</p>
</td>
</tr>
</table>
<p> </p>
</body>
</html>
<?
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
?>
Code: Selecteer alles
<p><?
$sql= "SELECT id,spot,location FROM phpbb_spots ORDER BY id desc limit 50"
";
$res = mysql_query($query);
while($data = @mysql_fetch_array($res))
{
echo " <a href="spot.php?id=$data["id"]."">".$data['spot']."</a><br>";
}
?>
</p>