At the moment posting news prompts you to fill in what category you would like the news to be under. From there what you specified is put into a field in the news row.
However, I plan to make a drop down menu that will attach an id to the news in the 'cat' field.
So I have a new table for categories, with certain details on the diffrent categories, and wondered what the query would be to call up the category from the number specified in the news table...i think...
Code: Select all
{$query = mysql_query("SELECT * FROM {$prefix}_news ORDER BY id DESC LIMIT 9");
while($result = mysql_fetch_array($query))
{$query2 = mysql_query("SELECT * FROM {$prefix}_category WHERE id = $resultїcat]");
while($result2 = mysql_fetch_array($query2))