Thread: mysql HELP!
View Single Post
Old 09-30-2001, 11:27 AM   #1
pk
Registered User
 
pk's Avatar
 
Join Date: Nov 2000
Location: Toronto, Ontario
Posts: 209
Default mysql HELP!

hi

How can i combine these 2 statements into one?

PHP Code:
select linkID from linkcat where cat='cars'
this will give me this
----------
|linkID|
|12 |
|1 |

PHP Code:
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'?


I tried this
PHP Code:
select links.title from linkcat,links where linkcat.cat='cars'
but it didn't work. It just showed me all records
pk is offline   Reply With Quote