Hi everyone,
Am struggling to setup a query that can return additional results if the default query doesn’t return enough.
For example:
Table: Games
id
name
genre
console
Query:
Select * FROM [Games] WHERE genre=‘Driving’ and console=‘PlayStation’ LIMIT 0,5
If there are only 3 matching results, however, how could I adapt this query to show 2 results from other titles are in the same genre, but on any format?
E.g.
- Result 1: Genre = Driving / Console = PlayStation
- Result 2: Genre = Driving / Console = PlayStation
- Result 3: Genre = Driving / Console = PlayStation
- Result 4: Genre = Driving / Console = Any
- Result 5: Genre = Driving / Console = Any
Ideally in a single query, really stuck on setting this up!
Often most results will have the full set of 5, but sometimes there are only 3/4 and ideally I’d want to fill up the gap!
Many thanks for any help!
J