Code Duplication    Length = 8-8 lines in 2 locations

lib/db.php 2 locations

@@ 102-109 (lines=8) @@
99
			$value = array($value);
100
		}
101
		$count = count($value);
102
		if ($count===0){
103
			return;
104
		} elseif ($count===1){
105
			$this->execute('DELETE FROM ' . $this->tableName . ' WHERE `'. $field .'` =?', $value);
106
		} else {
107
			$stmt = $this->buildInQuery($field, $value);
108
			$this->execute('DELETE FROM ' . $this->tableName . ' WHERE ' . $stmt, $value);
109
		}
110
	}
111
	
112
	/**
@@ 136-143 (lines=8) @@
133
			$value = array($value);
134
		}
135
		$count = count($value);
136
		if ($count===0){
137
			return array();
138
		} elseif ($count===1){
139
			$result = $this->execute('SELECT * FROM ' . $this->tableName . ' WHERE `'. $field .'` =?', $value);
140
		} else {
141
			$stmt = $this->buildInQuery($field, $value);
142
			$result = $this->execute('SELECT * FROM ' . $this->tableName . ' WHERE '. $stmt , $value);
143
		}
144
		
145
		$data = $result->fetchAll();
146
		if (!is_array($data)){