Hi there,

I'm pretty new to php so please bare with me - :rolleyes: lol. I've created two tables in a MySQL db one called topics and one called courses. I have a couple of files which allow me to post data to the db (written in php) and now I'd like to retrieve the data from the database and display it on screen using PHP.

My table structures are as follows:
Courses table - 4 fields: id, name, active and reason.
Topics table - id, parents, title, description

So what I'd like to do if possible is list all course names along with there ID's and then and any topics whose parents field = course name underneath them for example...

1 Course
Topic 1, Topic 2

34 Course
Another Topic

as I say I'm pretty new to this stuff so any help would be appreciated - let me know if you need any more information.

Arthur :cool:

check this example query:

$categories = mysql_query("SELECT prodGroup, product_categ.naam, product_categ.id FROM productdetails, product_categ WHERE categorie = product_categ.id GROUP BY categorie ORDER BY prodGroup, categorie")

is based on the same idea.