help with my forum

Posted on Sunday 4th March 2007 at 05:00 AM
paradox
paradox's Avatar
ok im makin a forum and neeed help! how do you call out the data like you guys did for this forum to make it look like..

category1
==forum
==kldsfj

category2
==sdfsd
==dfdf
Tehleetness
Posted on Sunday 4th March 2007 at 12:30 PM
DanielXP
DanielXP's Avatar
PHP Code
  1. $query = mysql_query("SELECT * FROM `CATEGORYS`") or die(mysql_error());
  2. while($r = mysql_fetch_array($query))
  3. {
  4. //This gets out all the cats no we need to get the forums
  5. $getforums = mysql_query("SELECT * FROM `FORUMS` WHERE `CAT_ID` = '$r[id]'") or die(mysql_error());
  6. while($forums = mysql_fetch_array($getforums))
  7. {
  8. //This gets all the forums for that category
  9. }
  10. }


Thats basicly it you just need to lay it out. :)
Posted on Monday 5th March 2007 at 04:12 AM
paradox
paradox's Avatar
aight cool. thanks man! leave this thread open cause i might be back for more help : )-
Tehleetness
Posted on Tuesday 6th March 2007 at 08:32 PM
paradox
paradox's Avatar
ok heres another question..
i want to setup a nav for my forum
ex. bein category>>forum>>topic

im tryin to figure out the best way to do this any help would be appreciated.
Tehleetness
Posted on Wednesday 7th March 2007 at 08:29 PM
ShadowMage
ShadowMage's Avatar
have a mysql_query get the data for the form then do a mysql_fetch_array to it then 1 more of each to get data where cid of the forum is equal to the id in the reg categories table or something like that?
failure i sense
Login or register to respond to this forum topic.