Code Duplication    Length = 5-5 lines in 2 locations

class/bbcvols.class.php 1 location

@@ 307-311 (lines=5) @@
304
305
306
        $sql .= ' FROM ' . MAIN_DB_PREFIX . $this->table_element . ' as t';
307
        if (null !== $ref) {
308
            $sql .= ' WHERE t.ref = ' . '\'' . $ref . '\'';
309
        } else {
310
            $sql .= ' WHERE t.idBBC_vols = ' . $id;
311
        }
312
313
        $resql = $this->db->query($sql);
314
        if ($resql) {

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