From 0d87e441c2833f3f1b5377fc48ba364a6db90858 Mon Sep 17 00:00:00 2001 From: SofianeLasri <alasri250@gmail.com> Date: Fri, 14 Jan 2022 17:23:27 +0100 Subject: [PATCH] test --- core/classes/Shop.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/core/classes/Shop.php b/core/classes/Shop.php index fee19b96..9efc08f5 100644 --- a/core/classes/Shop.php +++ b/core/classes/Shop.php @@ -1,10 +1,8 @@ <?php class Shop{ public static function getAllProducts(){ - $itemConfig = Connexion::pdo()->query("SELECT itemConfig FROM qs_shops")->fetchAll(PDO::FETCH_ASSOC); - $items = yaml_parse($itemConfig); - print_r($items); - + $itemsConfig = Connexion::pdo()->query("SELECT itemConfig FROM qs_shops")->fetchAll(PDO::FETCH_ASSOC); + /* item: ==: org.bukkit.inventory.ItemStack @@ -13,7 +11,10 @@ public static function getAllProducts(){ */ $return = array(); - foreach($items as $item){ + foreach($itemsConfig as $itemConfig){ + $item = yaml_parse($itemConfig); + print_r($items); + $itemAleadyEntered = false; foreach($return as $checkItem){ if($item['item']['type'] == $checkItem->getId()){ -- GitLab