
Ok here is one for you that I am am too novice at sql queries to figure out past what I already have.
"SELECT option_value_id FROM " . DB_PREFIX . "product_option_value WHERE product_id = ' " .$productId . " ' AND (option_id = '18' OR option_id = '13')";
This returns the option_value_id's for whatever product_id I provide.
Is it possible to only return the option_value_id IF the "name" in option_value_description is a certain name?
Here is how I got the name but I had to provide the option_value_id from the sql query above
"SELECT name FROM " . DB_PREFIX . "option_value_description WHERE option_value_id = ' " . $eachoptionvalue . " ' "
Now I know there can be queries that use 'left join' type of stuff and this may be the time it wouldn't work but I'd like to know the possibilities....
This may be a quick answer of "no not possible" but I have spent a few hours trying to figure it out and I can't get it to work.
Thank you,
Mike