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

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