jasehead Posted June 27, 2020 Share Posted June 27, 2020 I need help thinking in MySQL - working in phpMyAdmin. I want to create a query to: join order_inventory to order_summary by the order number use all of the order_inventory columns but also add the status column from order_summary (where status = processing) filter the list to show only products that DO NOT contain 2021 in the product name Link to comment Share on other sites More sharing options...
bsmither Posted June 27, 2020 Share Posted June 27, 2020 Try: SELECT S.`status`, I.* FROM CubeCart_order_summary AS S LEFT JOIN CubeCart_order_inventory AS I USING (cart_order_id) WHERE S.`status` = 2 AND I.`name` NOT LIKE '%2021%'; Link to comment Share on other sites More sharing options...
jasehead Posted June 27, 2020 Author Share Posted June 27, 2020 You're brilliant - thank you Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.