You are not getting this right because your subquery (the "SELECT * FROM Locations where id>1 and id<10 ) will return more than 1 row, causing your main query to error. Also, you have a double quote in the subquery which would cause it to error outright.
Lastly, unless absolutely necessary, NEVER USE SELECT *. It does not use indexes (not optimized) because it forces your database to search the ENTIRE table. Always tell the query which fields you want to see.
mySQL="SELECT * FROM products WHERE loc IN (SELECT * FROM Locations WHERE id > 1 AND id < 10 )"
mySQL="SELECT * FROM products WHERE loc IN (SELECT * FROM Locations WHERE id BETWEEN 1 AND 10 )"