Jump to content

How to make this query


hno

Recommended Posts

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

Link to comment
https://forums.phpfreaks.com/topic/201509-how-to-make-this-query/
Share on other sites

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.

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.