Code Duplication    Length = 5-5 lines in 2 locations

class/bbcvols.class.php 1 location

@@ 318-322 (lines=5) @@
315
316
317
        $sql .= ' FROM ' . MAIN_DB_PREFIX . $this->table_element . ' as t';
318
        if (null !== $ref) {
319
            $sql .= ' WHERE t.ref = ' . '\'' . $ref . '\'';
320
        } else {
321
            $sql .= ' WHERE t.idBBC_vols = ' . $id;
322
        }
323
324
        $resql = $this->db->query($sql);
325
        if ($resql) {

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) {