Im getting kinda tired here and im trying to figure out whats wrong with this script:
PHP Code:
<?php
if ($page=="main"){
$result = mysql_query ("select * from n1_forumgroups ORDER BY 'pos'");
while($forum = mysql_fetch_array($result)){
$*** = mysql_query("SELECT * from 'n1_forumgroups' where 'id'='".$forum['id']."' ORDER BY 'pos' DESC");
$forumgroup = mysql_fetch_array($***);
echo "
<tr>
<td class=\"subtop\"><span style=\"margin-left: 2px; font-weight: bold;\">".$forumgroup['title']."</span></td>
<td style=\"width: 64px;\" class=\"subtop\"><span style=\"margin-left: 2px;\">Topics:</span></td>
<td style=\"width: 64px;\" class=\"subtop\"><span style=\"margin-left: 2px;\">Replies:</span</td>
<td style=\"width: 168px;\" class=\"subtop\"><span style=\"margin-left: 2px;\">Last Post:</span></td>
</tr>
";
mysql_free_result($***);
$poop = mysql_query("SELECT * from 'n1_forums' where 'parent'='".$forum['id']."' ORDER BY 'pos' DESC");
while($forum = mysql_fetch_array($poop)){
echo "
<tr>
<td class=\"forumdesc1\">
<a href=\"#\"><span class=\"bold\">".$forum['title']."</span></a>
<br />
".$forum['description']."
</td>
<td class=\"forumdesc1\">65</td>
<td class=\"forumdesc1\">445</td>
<td class=\"forumdesc1\">135min ago.<br />by: TyR</td>
</tr>
";
}
mysql_free_result($poop);
}
}
?>
i just get alot o errors like:
Quote:
|
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 ''n1_forumgroups' where 'id'='1' ORDER BY 'pos' DESC' at line 1
|
can anyone see whats wrong ?
Last edited by TyR; 03-26-2005 at 05:04 PM..
|