I have a simply query to fetch products based on a comma separated list of IDs:
CREATE PROCEDURE `databaseName`.`fetchRecentlyViewed` (IN productIdCsv VARCHAR(128))
BEGIN
SELECT listingTitle, productName, productID FROM products WHERE productID IN (productIdCsv );
END
If I run this query against it:
CALL fetchRecentlyViewed ('6,7,4,3')
I only ever get the first product returned - its so simple I really don't know where to go from here!
I'm missing something obvious I'm sure!