抱歉,标题太糟糕了,但我希望能有所帮助
我刚刚创建了第二个品牌,因为我想在我的产品中使用多个品牌。
因此我用这个来获得 1 个品牌:
$get_brand_pro = "select * from products where product_brand='$brand_id'";
但我现在想知道如何获得更多, 我试过这个:
$get_brand_pro = "select * from products where product_brand='$brand_id' AND product_brand1='$brand_id'";
但这行不通。
提前致谢
最佳答案
听起来您想使用 OR 不使用 AND 如果您想要两者
$get_brand_pro = "select * from products where product_brand='$brand_id' OR product_brand1='$brand_id'";
关于php - 从两个不同的产品中选择 *,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45984974/