mysql help!

admin

Administrator
Staff member
hi

How can i combine these 2 statements into one?

select linkID from linkcat where cat='cars'

this will give me this
----------
|linkID|
|12 |
|1 |


select title from links where linkID=12

will give me
----------
title
---------
|great cars|

can i combine those 2 statements? so that i will select all titles where cat='cars'? They are stored in 2 different tables.


I tried this

select links.title from linkcat,links where linkcat.cat='cars'

but it didn't work. It just showed me all records
 
Back
Top