79416994

Date: 2025-02-06 06:54:10
Score: 0.5
Natty:
Report link

I added:

ORDER BY op.product_id DESC LIMIT 1

Full function Fix:

public function getSellerOrderProducts($order_id, $seller_id1){
$query = $this->db->query("SELECT pvo.product_id,(SELECT op.name FROM " . DB_PREFIX . "order_product op where op.product_id = pvo.product_id AND op.order_id = pvo.order_id ORDER BY op.product_id DESC LIMIT 1) as product_name FROM " . DB_PREFIX . "purpletree_vendor_orders pvo WHERE pvo.seller_id='".(int)$seller_id1."' AND pvo.order_id = '".(int)$order_id."'");

    return $query->rows;
}
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Ice Q