I've been searching the internet and found an 'almost' solution to my problem. I am using the query: 'MYSQL'
SELECT distinct company,price,material,`contractors_parameters`.`width`,`contractors_parameters`.`height`
from `contractors_parameters`
join `Windows_last_submissions` `wls`
where `wls`.`width` in (SELECT SPLIT_STR(`contractors_parameters`.`width` /*string*/
, ',' /*delimiter*/
, 1 /*start_position*/
))
and `wls`.`height` in (SELECT SPLIT_STR(`contractors_parameters`.`height` /*string*/
, ',' /*delimiter*/
, 1 /*start_position*/
))
and `contractors_parameters`.`material` = `wls`.`chosenmaterial`
and `contractors_parameters`.`type` = `wls`.`type`
and `contractors_parameters`.`price` <= `wls`.`maximumbid`
ORDER BY `contractors_parameters`.`company` ASC
In my "width" and "height" columns..there may be multiple integers as thus: "22,23,24,25,". I have used the SPLIT_STR function (not available with fiddle I guess) to separate these numbers as separate strings and query againsts them using the IN clause.
It almost works except if the dimensions in 'contractors_parameters' are width=24,25 height=48,49,50 and the dimensions in 'Windows_last_submission' (this isthe table that I'm querying) - it will work..but if the dimensions from 'contractors_paramaters' are reversed, or in a different order, say width=25,24 height=48,49,50 - it will nOt work.
Anyone have any advice? I tried to use fiddle but it errors when I use the SPLIT_STR() function.