guitardave78
Programmer
Can anyone show me how i can do this
SELECT * , (
SELECT pic_path
FROM tbl_newspics
WHERE tbl_newspics.pic_newsid = tbl_news.news_id
LIMIT 1 ) AS pic
FROM tbl_news
WHERE news_publish =1
ORDER BY news_added DESC
LIMIT 5
Basically I have a news table and a pictures table. i want to be able to link them but only have the first picture joined with the news
}...the bane of my life!
SELECT * , (
SELECT pic_path
FROM tbl_newspics
WHERE tbl_newspics.pic_newsid = tbl_news.news_id
LIMIT 1 ) AS pic
FROM tbl_news
WHERE news_publish =1
ORDER BY news_added DESC
LIMIT 5
Basically I have a news table and a pictures table. i want to be able to link them but only have the first picture joined with the news
}...the bane of my life!