Jump to content

Help with LEFT JOIN - Returning NULL for Results of one Table


BrazilMac

Recommended Posts

Hello,

 

Im trying to use a LEFT Join on 2 tables: One is Affiliate Feed and the other is Price Feed. AffiliateFeed contains a list of items for sale. the id for each product is stored in the ID column. Mind that there is no Primary Key on this table since this table is imported from a feed daily to mysql server so.

 

The PriceFeed table contains 3 fields: EVENT_ID, MAXIMUM and MINIMUM. These are used to store the id of the product, its highest and lower price. This table also does not have a primary key.

 

This is the query Im using:

 

SELECT *

FROM AffiliateFeed

LEFT JOIN PriceFeed ON AffiliateFeed.ID = PriceFeed.EVENT_ID

WHERE GENREGRANDPARENT = 'DELL COMPUTERS'

 

The query returns all fields from AffiliateFeed and its data, but for the 3 fields from PriceFeed, EVENT_ID, MAXIMUM and MINIMUM showed as NULL (Im using PHPAdmin for this query). All data for these rows are NULL.

 

What can I do to fix???

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.