SELECT * FROM menu WHERE item_id = 1 OR item_id = 2 OR item_id = 3;
The above statement returns 3 rows.
But the statement below only returns 2 rows.
SELECT * FROM menu WHERE item_id = 1 OR item_id = 1 OR item_id = 2;
And I understand why like, but is there a way to force item_id 1 to be returned twice???
Example of what I want to be returned:
id -> 1 Chips €2.50
id -> 1 Chips €2.50
id -> 2 Coke €1.60
——————–
Total €6.60
You could join on another table, for example
Or just duplicate them in your application.
You shouldn’t really need to do what you’re asking for.