Michael Morris
02-10-2005, 07:09 PM
Here it is
SELECT * FROM post
WHERE userid = 1
AND postid IN SELECT reviewids from product where productid = 3
The product table has a field called reviewids which is a list of reviewsids in this format 980,1020,2212
I know I can execute a single query to grab the ids and a second query to make this check (which should return true or false), but I'd rather do it in one query if I can.
SELECT * FROM post
WHERE userid = 1
AND postid IN SELECT reviewids from product where productid = 3
The product table has a field called reviewids which is a list of reviewsids in this format 980,1020,2212
I know I can execute a single query to grab the ids and a second query to make this check (which should return true or false), but I'd rather do it in one query if I can.