Code Duplication    Length = 5-5 lines in 2 locations

class/bbctypes.class.php 1 location

@@ 177-181 (lines=5) @@
174
175
176
        $sql .= ' FROM ' . MAIN_DB_PREFIX . $this->table_element . ' as t';
177
        if (null !== $ref) {
178
            $sql .= ' WHERE t.ref = ' . '\'' . $ref . '\'';
179
        } else {
180
            $sql .= ' WHERE t.idType = ' . $id;
181
        }
182
183
        $resql = $this->db->query($sql);
184
        if ($resql) {

class/bbcvols.class.php 1 location

@@ 337-341 (lines=5) @@
334
335
336
        $sql .= ' FROM ' . MAIN_DB_PREFIX . $this->table_element . ' as t';
337
        if (null !== $ref) {
338
            $sql .= ' WHERE t.ref = ' . '\'' . $ref . '\'';
339
        } else {
340
            $sql .= ' WHERE t.idBBC_vols = ' . $id;
341
        }
342
343
        $resql = $this->db->query($sql);
344
        if ($resql) {