Reputation: 791
I want to select only one row with the Id 'productId', I am now displaying all three rows with 'productId' of 3, how can I only display 1 row?
$sql = "SELECT * from Product
inner join OrderItems ON Product.productId = OrderItems.productId";
Any help would be greatly appreciated
Upvotes: 0
Views: 33
Reputation: 791
With the nudge from Joe, this works!
$sql = "SELECT * from Product
inner join OrderItems ON Product.productId = OrderItems.productId where Product.size = OrderItems.size and Product.color = OrderItems.colors";
Upvotes: 1