Jump to content

creatin my own forums


chriscloyd

Recommended Posts

i get this error
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/fragradi/public_html/Untitled-1.php on line 14
Topics Replies

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/fragradi/public_html/Untitled-1.php on line 14
Topics Replies

but from my code below i dont see an error can someone help me?

[code]<?php
include("db.php");
$catagories = mysql_query("SELECT * FROM catagories ORDER BY id ASC");
while ($cats = mysql_fetch_array($catagories)) {
$id = $cats['id'];
$title = $cats['title'];
echo '<table width="632" border="0" cellspacing="0" cellpadding="0" class="border">
    <tr>
    <td class="header2">'.$title.'</td>
    <td class="header2">Topics</td>
    <td class="header2">Replies</td>
  </tr>';
$forums = mysql_query("SELECT * FORM forums WHERE cid = '$id' ");
while ($f = mysql_fetch_array($forums)) {
$ftitle = $f['name'];
$fid =  $f['fid'];
$description = $f['description'];
  echo '<tr>
    <td width="389">'.$ftitle.'<br>'.$description.'</td>
<td width="129">';
$nt = mysql_query("SELECT * FROM topics WHERE fid = '$fid' ");
$nts = mysql_num_rows($nt);
echo $nts;
echo '</td>
    <td width="114">';
$nr = mysql_query("SELECT * FROM replies WHERE fid = '$fid' ");
$nrs = mysql_num_rows($rt);
echo $nrs;
echo '</td>
  </tr>
</table><br>';
}
}
?>[/code]
Link to comment
https://forums.phpfreaks.com/topic/26663-creatin-my-own-forums/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.