I have the following query:
select * from cars where make in (\'BMW\', \'Toyota\', \'Nissan\')
What I want to do is store the where param
you can use JOIN statement.
SELECT distinct c.* FROM cars c JOIN carsfrosale s ON s.id = c.fk_s
If you want filter your list of carsforsale you can add
WHERE s.id in (....)