1. Список говнокодов пользователя Chel

    Всего: 1

  2. PHP / Говнокод #20336

    +4

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    7. 7
    8. 8
    $aProductType     = [];
    $productName      = $conn->query("SELECT value FROM catalog_product_entity_varchar WHERE entity_id = '" . $value['entity_id'] . "' AND attribute_id = 71")->fetch();
    $productUrl       = $conn->query("SELECT value FROM catalog_product_entity_varchar WHERE entity_id = '" . $value['entity_id'] . "' AND attribute_id = 98")->fetch();
    $productImage     = $conn->query("SELECT value FROM catalog_product_entity_media_gallery WHERE entity_id = '" . $value['entity_id'] . "'")->fetchAll();
    $productPrice     = $conn->query("SELECT value FROM catalog_product_entity_decimal WHERE entity_id = '" . $value['entity_id'] . "' AND attribute_id = 75")->fetch();
    $productType      = $conn->query('SELECT category_id FROM catalog_category_product WHERE product_id = ' . $value['entity_id'])->fetchAll();
    $productAvailable = $conn->query('SELECT qty FROM cataloginventory_stock_item WHERE product_id = ' . $value['entity_id'])->fetch();
    $productDesc      = $conn->query('SELECT value FROM catalog_product_entity_text WHERE entity_id = "' . $value['entity_id'] . '"')->fetch();

    Magento, controller, indexAction, front

    Chel, 07 Июля 2016

    Комментарии (7)