M
M K
Okay, I have a ShoppingCartDetails table. The shopping cart lists photographic prints. There may be one image with more than one line item, or more than one print size. For example
CartDetailID ProductID Qty PhotoID..
1 5x7 2 000
2 4x5 4 000
Now, there may also be a line item for a product that requires more than one image. In which case, those images are in a second table, linked by the CartDetailID
CartDetailID ProductID Qty PhotoID..
3 PhotoCube 2
AddPhotoID CartDetailID PhotoID..
1 3 000
2 3 000
3 3 000
4 3 000
5 3 000
So I'd like my datagrid to do something like this
Photo Products Qty Tota
--------------------------------------
0003 5x7 2 $2.9
4x5 4 $3.7
--------------------------------------
0004 PhotoCube 2 $12.9
000
000
000
000
Am I nuts? Any ideas? I could probably do two queries, one for line items with a PhotoID and then group the Products by that PhotoID (DataView or something) and another query for line items without a PhotoID which would then get a group of PhotoIDs from the second table. But I wanted to know if there was anybody with a good idea.
CartDetailID ProductID Qty PhotoID..
1 5x7 2 000
2 4x5 4 000
Now, there may also be a line item for a product that requires more than one image. In which case, those images are in a second table, linked by the CartDetailID
CartDetailID ProductID Qty PhotoID..
3 PhotoCube 2
AddPhotoID CartDetailID PhotoID..
1 3 000
2 3 000
3 3 000
4 3 000
5 3 000
So I'd like my datagrid to do something like this
Photo Products Qty Tota
--------------------------------------
0003 5x7 2 $2.9
4x5 4 $3.7
--------------------------------------
0004 PhotoCube 2 $12.9
000
000
000
000
Am I nuts? Any ideas? I could probably do two queries, one for line items with a PhotoID and then group the Products by that PhotoID (DataView or something) and another query for line items without a PhotoID which would then get a group of PhotoIDs from the second table. But I wanted to know if there was anybody with a good idea.