Forgot Password / Register
Site Statistics
Total Members: 520
Total Tutorials: 242
Newsest User: 8884244477
Todays Unique Hits: 685
0 Users 2 Guests Online
Forum Index » PHP + MySQL » help with my forum
Posted on Sunday 4th March 2007 at 05:00 AM
paradox
templates/default/images/noavatar.png's Avatar
Newbie
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
Posted on Sunday 4th March 2007 at 12:30 PM
DanielXP
avatars/1.png's Avatar
Senior Member
PHP Code
1
2
3
4
5
6
7
8
9
10
$query = mysql_query("SELECT * FROM `CATEGORYS`") or die(mysql_error());
while($r = mysql_fetch_array($query)) 
{
//This gets out all the cats no we need to get the forums
$getforums = mysql_query("SELECT * FROM `FORUMS` WHERE `CAT_ID` = '$r[id]'") or die(mysql_error());
while($forums = mysql_fetch_array($getforums)) 
{
//This gets all the forums for that category
}
}


Thats basicly it you just need to lay it out. :)
Posted on Monday 5th March 2007 at 04:12 AM
paradox
templates/default/images/noavatar.png's Avatar
Newbie
aight cool. thanks man! leave this thread open cause i might be back for more help : )-
Posted on Tuesday 6th March 2007 at 08:32 PM
paradox
templates/default/images/noavatar.png's Avatar
Newbie
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.
Posted on Wednesday 7th March 2007 at 08:29 PM
ShadowMage
templates/default/images/noavatar.png's Avatar
Senior Member
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?