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

    Всего: 1

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

    +160

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    // проверяем на дубли 
    $email_exists =  $db->select('SELECT * FROM customers_info AS i LEFT JOIN customers AS c ON i.login = c.login WHERE deleted = "n" AND i.email LIKE ?', "%$email%")
     || $db->select('SELECT * FROM customers_info_inpr AS i LEFT JOIN customers AS c ON i.login = c.login WHERE deleted = "n" AND i.inpr_email LIKE ?', "%$email%") 
     || $db->select('SELECT * FROM customers_info_org  AS i LEFT JOIN customers AS c ON i.login = c.login WHERE deleted = "n" AND i.org_phone LIKE ?', "%$email%") 
     || $db->select('SELECT * FROM customers_info_org  AS i LEFT JOIN customers AS c ON i.login = c.login WHERE deleted = "n" AND i.contact_phone LIKE ?', "%$email%");

    Всего лишь проверка на дубли =)

    seth2810, 03 Декабря 2014

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