gpt4 book ai didi

mysql - LEFT JOIN 3 个表 sql OpenCart

转载 作者:行者123 更新时间:2023-11-29 21:02:17 25 4
gpt4 key购买 nike

我需要将这个函数中的另一个表与名称供应商连接起来,这可能吗

public function getProducts($data = array()) {
$sql = "SELECT * FROM " . DB_PREFIX . "product p LEFT JOIN " . DB_PREFIX . "product_description pd ON (p.product_id = pd.product_id) WHERE pd.language_id = '" . (int)$this->config->get('config_language_id') . "'";

最佳答案

  $sql = "
SELECT c.olumns, y.ou, a.ctually, w.ant
FROM product p
JOIN product_description pd
ON pd.product_id = p.product_id
JOIN vendors v
ON v.product_id = p.product_id
WHERE pd.language_id = ?
ORDER
BY p.product_id;
";

现在看看准备好的语句

关于mysql - LEFT JOIN 3 个表 sql OpenCart,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37112163/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com