[ic] Ebay Feed - MySQL Query Problem

Gert van der Spoel ic at 3edge.com
Sat May 13 08:55:21 EDT 2006


William Fiore writes: 

> Hi, 
> 
> I have created a feed in PHP to submit my products to Ebay. My original
> feed worked fine but did not filter products. It looked like: 
> 
> $query = "SELECT * FROM products WHERE 1; 
> 
> Obviously I do not want all 5,000 of my products submitted to Ebay so I
> would like to modify the query to only list new products (listed in the
> last 90 days) and that I have at least (5) of in stock. Even better, would
> be products that have been purchased before and appear in my "orderline"
> table. 
> 
> So far I have: 
> 
> $query = "SELECT * FROM products WHERE sku = (SELECT sku FROM inventory
> WHERE quantity > 5) AND date_added >= curdate()"; 
> 
 

$query = "SELECT * FROM products WHERE sku = ANY (SELECT sku FROM inventory
WHERE quantity > 5) AND date_added >= curdate()"; 

CU, 

Gert


More information about the interchange-users mailing list