Mysql syntax using IN help!
Posted
by Axel
on Stack Overflow
See other posts from Stack Overflow
or by Axel
Published on 2010-03-21T22:22:53Z
Indexed on
2010/03/21
22:31 UTC
Read the original article
Hit count: 262
Hi,
i have a pictures table : pictures(articleid,pictureurl)
And an articles table : articles(id,title,category)
So, briefly, every article has a picture, and i link pictures with article using articleid
column. now i want to select 5 pictures of articles in politic
category.
i think that can be done using IN but i can't figure out how to do it.
Note: Please only one query, because i can do it by selecting articles firstly then getting the pictures.
Thanks
© Stack Overflow or respective owner