Jump to content

select three diferent fields related to a common field


johnwayne77

Recommended Posts

hello!

 

i'm implementing an e-commerce system to distribute key codes.

 

right now i'm thinking of a sql syntax to do the following:

 

i have a table: orders

 

here i have the orders_id field (unique for each order placed)

 

with this orders_id field there may be more than one products ordered therefore in the products_id field i can have the following situation:

 

orders_id: 101

products_id: 13

orders_id: 101

products_id: 43

orders_id: 101

products_id: 1

 

so i have three rows with the same orders_id but different products_id

 

now i want to grab the value of these products_id for the specified orders_id (p.s. i can provide the orders_id value already)

 

any ideas? i'm a little stuck on this..

 

thanks

 

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.