如何将请求提取到数据库?

时间:2016-02-04 22:35:26

标签: php mysql sql opencart

美好的一天!请告诉我如何提取数据以获取3个不同表格的信息?

我现在有:

$result = $this->db->query("SELECT * FROM oc_order_product WHERE order_id = (SELECT order_id FROM oc_order_product ORDER BY order_product_id DESC LIMIT 1)");

EOD;
for($i = 0; $i<count($result->rows); $i++) {
$points = $result->rows[$i]['points'];
$price = $result->rows[$i]['price'];
$counts = $result->rows[$i]['quantity'];
$str .= <<<EOD

这些来自另一个表,而不是 oc_order_product oc_product_option_value

$price = $result->rows[$i]['price'];
$counts = $result->rows[$i]['quantity'];

如何正确添加** $ result ** oc_product_option_value 价格数量?因为从来没有尝试过出错的事情)

0 个答案:

没有答案