video
v_id, v_name
property:
p_id, p_name
property_video:
pv_id, pv_v_id, <- video id pv_p_id, <- property id
I want to look for muti-cat, for example:
Given some p_id (property id), I want the search to match those id videos
all p_id is needed in the property_video property and the same pv_v_id
then mysql wrote:
SELECT a.*, b.* FROM video as a, property_video as b WHERE a.v_id = b.pv_v_id and b.pv_p_id in(12,15) GROUP BY a.v_id;
I know that this part in(12,15) should change to "and", but I donβt know how to make it work.
source share