I'm pretty new to MySQL+PHP and I was wondering if anyone could help me. I have 2 tables called categorys and links. In categorys I have: id, category, description and links In links I have: (several others) and category(which is the using the same id as the id in the categorys table) How can I match the 2 id's(id from the 'categorys' table and the category(id from the 'links' table) so instead of showing the name as a query of the category field, making it show the name of the category taken from the 'categorys' field. I hope it makes sense
OK, I believe you want this. You have 2 tables: Catagories with field names: id, category, desc Links with field names: category, ** other fields To bring back all the rows and the category from the categories table: select b.desc from links a, categories b where a.category = b.category