mysql joining three specific tables

Posted by sam lim on Stack Overflow See other posts from Stack Overflow or by sam lim
Published on 2012-12-17T05:00:34Z Indexed on 2012/12/17 5:03 UTC
Read the original article Hit count: 184

Filed under:

Here what i would like to pull date from this three table.

Table users i have three columns uid, username , data(text)

Table users_order i have three columns uid, orders_id , users_email

Table order_products i have three columns orders_id, product_id, product_name

I would like to use product_id as the ref/search to pull the user info from those three tables.

If product_id = 5

The query will display uid; username; users_email; orders_id; product_name; data (text)

how would i right the sql query for this situation.

Thanks,

© Stack Overflow or respective owner

Related posts about mysql