I believe you can do this using an INNER JOIN command. I have not done this in sometime, and I will give you a sample from my sql book.
Inner joins extract rows that are common to both tables, based on values in the common column. For example, you could write a query that would extract a list of customer numbers (from the sales table) and the salesperson's first and last name (from the slspers table) who serves them. The common condition would be the salespersons REPID, which would exist in only certain rows in both tables. You would write such a query like this : SELECT custnum, fname, lname FROM sales INNER JOIN slspers on sales.repid = slspers.repid So to try and relate this to your solution.... assume the tables are called PRODUCTINFO and PRICES and the common value in both is PRODUCT_ID. PROD_DEC is in PRODUCTINFO and PROD_PRICE is in PRICES SELECT PROD_DESC, PROD_PRICE FROM PRODUCTINFO INNER JOIN PRICES on PRODUCTINFO.PRODUCT_ID = PRICE.PRODUCT_ID This SHOULD return a record set of product id's with descriptions and prices... I believe... I have not tested it... But I THINK this is what you are looking for... Dave "Raymond Lilleodegard" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi! > > I have this tricky case, at lest for me : ) > > I'm trying to get some data out of two tables and listing the data in a > product/price site. But..... : > > I have one table with productinfo and one with prices. > And it is several columns with the same id in the pricetable, because every > product have several sizes. > > So... how do I get only one row from the "product table" and two rows from > the "price table" in one line in a page? > Is it possible? > > > > Best regards > > Raymond > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php