Skip to content
Snippets Groups Projects
Commit 0d87e441 authored by Sofiane Lasri's avatar Sofiane Lasri
Browse files

test

parent 2437d834
Branches
No related tags found
No related merge requests found
<?php <?php
class Shop{ class Shop{
public static function getAllProducts(){ public static function getAllProducts(){
$itemConfig = Connexion::pdo()->query("SELECT itemConfig FROM qs_shops")->fetchAll(PDO::FETCH_ASSOC); $itemsConfig = Connexion::pdo()->query("SELECT itemConfig FROM qs_shops")->fetchAll(PDO::FETCH_ASSOC);
$items = yaml_parse($itemConfig);
print_r($items);
/* /*
item: item:
...@@ -13,7 +11,10 @@ public static function getAllProducts(){ ...@@ -13,7 +11,10 @@ public static function getAllProducts(){
*/ */
$return = array(); $return = array();
foreach($items as $item){ foreach($itemsConfig as $itemConfig){
$item = yaml_parse($itemConfig);
print_r($items);
$itemAleadyEntered = false; $itemAleadyEntered = false;
foreach($return as $checkItem){ foreach($return as $checkItem){
if($item['item']['type'] == $checkItem->getId()){ if($item['item']['type'] == $checkItem->getId()){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment