I am not able to write a sql query where I need to join 2 tables and get the common value of both.
something like this,
select control_id from ProjectImage
where group_id ="20"
Join
(select images from coupon where coupon_name is "test" and images contains control_id of projectImage)
images is a list of contol_id's separated by comma's.
So in the end I want only those control ids which are present in the coupon's table image column.
ProjectImage table ---- 
         image_id   bigint(20)  
    control_id  varchar(255)
    name    varchar(255)
    project_id  bigint(20)      
    group_id    bigint(20)
Coupon table:
    id  bigint(20)  
    image   varchar(1250)   
    name    varchar(255)    
    status  int(11)     
    wafer_id    bigint(20)
 
     
     
     
    