that is the problem i need to display the sizeUnitPrice of a specific itemProdId from the sizes table.(item.itemProdId = size.sizeProductId) i think i see what is going on here when i state "WHERE itemOrdId =36
AND itemCustId = -1
AND itemProdId = sizeProductId"
i thoughht i was narrowing it...
no, when I run this query,
SELECT itemProdId, itemCustId, itemProdQty, itemProdSize, sizeUnitPrice, itemOrdId
FROM items, sizes
WHERE itemOrdId =36
AND itemCustId = -1
AND itemProdId = sizeProductId
i get 4 rows with itemOrdId=36, when i browse my items table in phpmyadmin there is only one row...
SELECT `itemProdId` , `itemProdQty` , `itemProdSize` , sizeUnitPrice, sum( `itemProdPrice` ) as calcTotal
FROM items
LEFT JOIN sizes ON itemProdId = sizeProductId
where `itemCustId` = -1
and `itemOrdId` = 36
group by itemProdId
i entered test data and this query only finds one row calcTotal...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.