Code Duplication    Length = 5-6 lines in 3 locations

php/jodel-web.php 3 locations

@@ 291-296 (lines=6) @@
288
						  FROM votes
289
						  WHERE (postId = '" . $postId . "' AND device_uid = '" . $deviceUid . "')");
290
	
291
	if($result === false)
292
	{
293
		$error = db_error();
294
		echo $error;
295
		echo "Adding Vote failed: (" . $result->errno . ") " . $result->error;
296
	}
297
298
	if($result->num_rows == 0)
299
	{
@@ 323-327 (lines=5) @@
320
	$result = $db->query("INSERT INTO votes (device_uid, postId, type)
321
					VALUES ('" . $device_uid . "','" . $postId . "','" . $voteType . "')");
322
	
323
	if($result === false){
324
			$error = db_error();
325
			echo $error;
326
			echo "Adding Vote failed: (" . $result->errno . ") " . $result->error;
327
	}	
328
	
329
}
330
@@ 356-361 (lines=6) @@
353
					"','" . $device_uid . "','" . $name . "','" . $lat . "','" . $lng . "') ");
354
355
	$success = TRUE;
356
	if($result === false){
357
			$error = db_error();
358
			echo $error;
359
			echo "Adding account failed: (" . $result->errno . ") " . $result->error;
360
			$success = FALSE;
361
	}	
362
	
363
	return $device_uid;
364
}