Is there a way to run a query inside of a query.
In the first step, the user types in part of a game title as a search and the results are dispalyed. In the second step, I need it to check for results in 4 other tables based upon that gametitle.
Ok heres an example. Every game title has its own unique id. A user searches for 'mario' and gets these results from the 'gamedata' table:
Mario 3
Super Mario Golden Coins
Mario Paint
Mario Mystery
Based on the game id, is there a way now to generate another query that will then do the following for EACH game title that is produced from the search results:
RUN A QUERY ON THE CHEATS TABLE, IF GAME ID EXISTS, SET A VARIABLE = 'Y'
RUN A QUERY ON THE REVIEWS TABLE, IF A GAME ID EXISTS, SET A VARIABLE = 'Y'
RUN A QUERY ON THE PREVIEWS TABLE, IF A GAME ID EXISTS, SET A VARIABLE = 'Y'
RUN A QUERY ON THE STRATEGIES TABLE, IF A GAME ID EXISTS, SET A VARIABLE = 'Y'
I can dispaly the search results fine, no problem. But trying to figure out how to get it to run more queries to determine if there is something in each of the above 4 tables is difficult for me. I'm a newbie, but still I thought I could tackle this. I have it rigged right now where each game title has CHEATS PREVIEWS REVIEWS AND STRATEGIES as field names in the table, then a value of "Y" is set to them when data is added to the corrosponding table. I understand that running mutliple quieries like this can take a load of CPU, but this is how I want to do it for now. It's just not effiecient the way I have it setup. I need realtime results, not results relating to a value of 'Y' in the same table.
Hopefully this makes sense. I've been messing with it for months now.
Thanks in advance for any help.