Code Duplication    Length = 5-5 lines in 2 locations

class/bbctypes.class.php 1 location

@@ 195-199 (lines=5) @@
192
193
		
194
		$sql .= ' FROM ' . MAIN_DB_PREFIX . $this->table_element . ' as t';
195
		if (null !== $ref) {
196
			$sql .= ' WHERE t.ref = ' . '\'' . $ref . '\'';
197
		} else {
198
			$sql .= ' WHERE t.idType = ' . $id;
199
		}
200
201
		$resql = $this->db->query($sql);
202
		if ($resql) {

class/bbcvols.class.php 1 location

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