Code Duplication    Length = 10-12 lines in 2 locations

get-posts-ajax.php 1 location

@@ 29-38 (lines=10) @@
26
	
27
	$result = $db->query("SELECT * FROM accounts WHERE id='1'");
28
	
29
	if ($result->num_rows > 0) {
30
		// output data of each row
31
		while($row = $result->fetch_assoc()) {
32
			$access_token = $row["access_token"];
33
		}
34
	}
35
	else
36
	{
37
		echo "0 results";
38
	}
39
	
40
	$accountCreator = new GetPosts();
41
	$accountCreator->setLastPostID($lastPostId);

index.php 1 location

@@ 17-28 (lines=12) @@
14
	$accessToken;
15
	$newPositionStatus;
16
	
17
	if ($result->num_rows > 0)
18
	{
19
		// output data of each row
20
		while($row = $result->fetch_assoc())
21
		{
22
			$accessToken = $row["access_token"];
23
		}
24
	}
25
	else
26
	{
27
		echo "Error: 0 results";
28
	}
29
	
30
	
31
	//createAccount();