Matthew Stuart wrote:

I have a home page where I need to show three news articles which are specified by the administrator - so it might not be the latest articles and they might not be in any order. I have designed the db to have two tables to fulfill this function the first table 'tbl_press' holds the news articles, and second 'tbl_hompageids' is what governs the three articles to be shown.

tbl_homepageids has three columns, fld_article1, fld_article2 and fld_article3 each having a value manually inputted to indicate which article to select from tbl_press

tbl_press has many columns, but the key one in this instance is a field called 'fld_id' which is the value I am trying to get the home page to read via use of tbl_homepageids.

Basically, I am trying to use the table 'tbl_homepageids' as the engine to select the correct articles from the table 'tbl_press'.

The recordset/SQL statement I am trying to create goes like this:

SELECT *
FROM tbl_homepageids, tbl_press
WHERE fld_article1,tbl_homepageids LIKE fld_id,tbl_press

WHERE tbl_homepageids.fld_article1 = tbl_press.fld_id



I will create another two recordsets/SQL statements for the other two press articles using fld_article2 and fld_article3.

Quite obviously the statement here isn't working and I have tried many different variations on the same theme, but haven't managed to achieve the results required, so I have written it in its simplest format hoping somebody can understand what I need and help me through this trying period in my life!!

TIA

Mat





-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to