Shoutbox

[Sorted] Multiple SQL Queries > 1 Query - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Skype & Technology (/forumdisplay.php?fid=9)
+---- Forum: Tech Talk (/forumdisplay.php?fid=17)
+----- Thread: [Sorted] Multiple SQL Queries > 1 Query (/showthread.php?tid=54089)

[Sorted] Multiple SQL Queries > 1 Query by Dempsey on 12-20-2005 at 11:59 AM

Is it possible to use the result of a sql query as a lookup for an additional query, but doing in just one query.

That sounds confusing :P

eg

I lookup records with ID of 10.

It returns 3 results.

Each of the 3 records has another ID number in a field, eg 11, 12 and 13.

Could I then lookup all of the records with ID of 11, 12 and 13?

So altogther I have records with IDs of 10, 11, 12 or 13.


Is that possible using just one query?  Or would I have to use more than one?


EDIT:  I managed to do it in the end, I had to use subqueries.