hno Posted May 12, 2010 Share Posted May 12, 2010 HI, I want to make a query that have tow part.The first part is a query that should run from table A and the second part should run from the table B.One of the rows that fetch from table A is 'user_id' which the second part should run by according to the 'user_id''s and it's a clause for the second query and the rows that should return from table B are just has the id's from table A. My english is not good and I apologize for that. Thanks Quote Link to comment https://forums.phpfreaks.com/topic/201509-how-to-make-this-query/ Share on other sites More sharing options...
otuatail Posted May 12, 2010 Share Posted May 12, 2010 You can join table a to table B in a single query where the 'user_id in table A is also in table B. Maybe if you could give us the table structure of both tables and what links are requred. If you are saying that you want to run a query in table A that is used in table B and there are a lot of queries in Table A, then this would be bad as you would be doing multipe queries in table B wrapped around multipe in table A. This is not good. Desmond. Quote Link to comment https://forums.phpfreaks.com/topic/201509-how-to-make-this-query/#findComment-1057439 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.