We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b44d68e commit 77e6b51Copy full SHA for 77e6b51
src/libraries/Packet.php
@@ -521,10 +521,13 @@ public function getUsedBy() {
521
522
$stmt = Common::$database->prepare('
523
SELECT
524
- `bnet_product_id`
525
- FROM `packet_used_by`
526
- WHERE `id` = :id
527
- ORDER BY `id` ASC;
+ `used`.`bnet_product_id`
+ FROM `packet_used_by` AS `used`
+ INNER JOIN
+ `products` AS `prods`
528
+ ON `used`.`bnet_product_id` = `prods`.`bnet_product_id`
529
+ WHERE `used`.`id` = :id
530
+ ORDER BY `prods`.`sort` ASC;
531
');
532
533
$stmt->bindParam( ':id', $this->id, PDO::PARAM_INT );
0 commit comments