Forum Moderators: coopster

Message Too Old, No Replies

Using Info From 2 Database Tables

         

matthew2riches

8:42 am on Feb 27, 2010 (gmt 0)

10+ Year Member



I wonder if you could help? :-)

I have 2 tables, 1 called 'listings' and 1 called 'cats'.

'Listings' contains all information and 'cats' contains a list of categories.

I currently have a page displaying all the 'listings' which I am able to select to view 1 record, able to search etc...

I'd now like to display a list of all the catagories from the 'cats' table in the right hand column of the same page.

I can't get my head around displaying information from 2 tables on the same page... Help?

Cheers!

Readie

9:04 am on Feb 27, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I had difficulty understanding it too, but [w3schools.com...] really clarified it for me.

If the two tables are supposed to be un-related to each other however... Just create a new SQL string, and mysql_query/result that

matthew2riches

12:14 pm on Feb 27, 2010 (gmt 0)

10+ Year Member



Yup... after a little playing around, I finally understood :-)