I have a form with two select inputs. In each input there are products as options. Each visitor must select two products as their favorites. Their choice goes into a table named: visitors_fav
The structure of table is:
visitors_fav:
vis_ID - productID_1 - productID_2
As you see i fetch the product IDs not their names and store them into the table.
I have another table named: Products
, the structure is like:
Product_ID - Product_Name
How can I get the Product_Name
for both productID_1
& productID_2
in a query?
(PHP Codeigniter active record is preferred, and also my database is mySQL)