I am struggling with this sql and want to be able to select from the PID column as well as the other two columns listed.
SELECT PID, BID AS BAID, SUM(Price*Quantity) AS Total
FROM product
INNER JOIN basket
ON product.PID = basket.PID
WHERE Email = '$email'
Basically the code executes fine without me trying to get the 'PID' column.
I can't figure out where to include it without breaking the code.
Any help is appreciated.
I've tried moving it about and even setting PID AS a new column but nothing seems to be working.