What I am hoping to do is filter one database query by another.
I have two databases and they both have a field call vehicle_type. What I want to happen is that vehicle_type from the products database filters what is shown from the accessories database.
These are my SQL queries
SELECT * FROM products WHERE id = %s",
SELECT * FROM accessories WHERE vehicle_type=''";
I think the accessories query should look like
SELECT * FROM accessories WHERE vehicle_type=''$vehicle_type";
but I don't know how to give $vehicle_type a value from the products database.
Hope this makes sense, any help would be greatly appreciated.
Thanks Dennis :0)