{"action":"created","comment":{"url":"https://api.github.com/repos/catsandspace/blog/pulls/comments/90760981","pull_request_review_id":11280402,"id":90760981,"diff_hunk":"@@ -8,15 +8,45 @@\n     $display = NULL; // To avoid \"undefined variable\".\n     $numberOfComments = NULL;\n \n+    // Pagination, display 2 posts per page\n+    // TODO: change to 5\n+    $postPage = 2;\n+\n+    // Query to check number of rows in table posts\n+    $query = \"SELECT * FROM posts\";\n+\n+    // Execute query.\n+    if ($stmt->prepare($query)) {\n+        $stmt->execute();\n+        $stmt->store_result();\n+        $rows = $stmt->num_rows; // Number of rows in posts\n+    }","path":"index.php","position":16,"original_position":16,"commit_id":"78a3de8892968737eaabb001d8630d23a13f5cf2","original_commit_id":"78a3de8892968737eaabb001d8630d23a13f5cf2","user":{"login":"LJNGDAHL","id":18701520,"avatar_url":"https://avatars.githubusercontent.com/u/18701520?v=3","gravatar_id":"","url":"https://api.github.com/users/LJNGDAHL","html_url":"https://github.com/LJNGDAHL","followers_url":"https://api.github.com/users/LJNGDAHL/followers","following_url":"https://api.github.com/users/LJNGDAHL/following{/other_user}","gists_url":"https://api.github.com/users/LJNGDAHL/gists{/gist_id}","starred_url":"https://api.github.com/users/LJNGDAHL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LJNGDAHL/subscriptions","organizations_url":"https://api.github.com/users/LJNGDAHL/orgs","repos_url":"https://api.github.com/users/LJNGDAHL/repos","events_url":"https://api.github.com/users/LJNGDAHL/events{/privacy}","received_events_url":"https://api.github.com/users/LJNGDAHL/received_events","type":"User","site_admin":false},"body":"Här borde vi ha någon else va? Om vår query inte funkar. ","created_at":"2016-12-03T17:14:13Z","updated_at":"2016-12-03T17:14:13Z","html_url":"https://github.com/catsandspace/blog/pull/113#discussion_r90760981","pull_request_url":"https://api.github.com/repos/catsandspace/blog/pulls/113","_links":{"self":{"href":"https://api.github.com/repos/catsandspace/blog/pulls/comments/90760981"},"html":{"href":"https://github.com/catsandspace/blog/pull/113#discussion_r90760981"},"pull_request":{"href":"https://api.github.com/repos/catsandspace/blog/pulls/113"}}},"pull_request":{"url":"https://api.github.com/repos/catsandspace/blog/pulls/113","id":96395621,"html_url":"https://github.com/catsandspace/blog/pull/113","diff_url":"https://github.com/catsandspace/blog/pull/113.diff","patch_url":"https://github.com/catsandspace/blog/pull/113.patch","issue_url":"https://api.github.com/repos/catsandspace/blog/issues/113","number":113,"state":"open","locked":false,"title":"Pagination added to index.php","user":{"login":"aalselius","id":23334951,"avatar_url":"https://avatars.githubusercontent.com/u/23334951?v=3","gravatar_id":"","url":"https://api.github.com/users/aalselius","html_url":"https://github.com/aalselius","followers_url":"https://api.github.com/users/aalselius/followers","following_url":"https://api.github.com/users/aalselius/following{/other_user}","gists_url":"https://api.github.com/users/aalselius/gists{/gist_id}","starred_url":"https://api.github.com/users/aalselius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aalselius/subscriptions","organizations_url":"https://api.github.com/users/aalselius/orgs","repos_url":"https://api.github.com/users/aalselius/repos","events_url":"https://api.github.com/users/aalselius/events{/privacy}","received_events_url":"https://api.github.com/users/aalselius/received_events","type":"User","site_admin":false},"body":"index.php - Pagination added at bottom, currently set to 2 a page for testing purpose\r\n - comment-bubble for comments=0","created_at":"2016-12-03T11:54:12Z","updated_at":"2016-12-03T17:18:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0638b39fa2d76b0ae3ba8224fa77602636495459","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/catsandspace/blog/pulls/113/commits","review_comments_url":"https://api.github.com/repos/catsandspace/blog/pulls/113/comments","review_comment_url":"https://api.github.com/repos/catsandspace/blog/pulls/comments{/number}","comments_url":"https://api.github.com/repos/catsandspace/blog/issues/113/comments","statuses_url":"https://api.github.com/repos/catsandspace/blog/statuses/78a3de8892968737eaabb001d8630d23a13f5cf2","head":{"label":"catsandspace:feature/pagination","ref":"feature/pagination","sha":"78a3de8892968737eaabb001d8630d23a13f5cf2","user":{"login":"catsandspace","id":23334957,"avatar_url":"https://avatars.githubusercontent.com/u/23334957?v=3","gravatar_id":"","url":"https://api.github.com/users/catsandspace","html_url":"https://github.com/catsandspace","followers_url":"https://api.github.com/users/catsandspace/followers","following_url":"https://api.github.com/users/catsandspace/following{/other_user}","gists_url":"https://api.github.com/users/catsandspace/gists{/gist_id}","starred_url":"https://api.github.com/users/catsandspace/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/catsandspace/subscriptions","organizations_url":"https://api.github.com/users/catsandspace/orgs","repos_url":"https://api.github.com/users/catsandspace/repos","events_url":"https://api.github.com/users/catsandspace/events{/privacy}","received_events_url":"https://api.github.com/users/catsandspace/received_events","type":"Organization","site_admin":false},"repo":{"id":73176286,"name":"blog","full_name":"catsandspace/blog","owner":{"login":"catsandspace","id":23334957,"avatar_url":"https://avatars.githubusercontent.com/u/23334957?v=3","gravatar_id":"","url":"https://api.github.com/users/catsandspace","html_url":"https://github.com/catsandspace","followers_url":"https://api.github.com/users/catsandspace/followers","following_url":"https://api.github.com/users/catsandspace/following{/other_user}","gists_url":"https://api.github.com/users/catsandspace/gists{/gist_id}","starred_url":"https://api.github.com/users/catsandspace/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/catsandspace/subscriptions","organizations_url":"https://api.github.com/users/catsandspace/orgs","repos_url":"https://api.github.com/users/catsandspace/repos","events_url":"https://api.github.com/users/catsandspace/events{/privacy}","received_events_url":"https://api.github.com/users/catsandspace/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/catsandspace/blog","description":"A blog built with PHP done as a learning experience.","fork":false,"url":"https://api.github.com/repos/catsandspace/blog","forks_url":"https://api.github.com/repos/catsandspace/blog/forks","keys_url":"https://api.github.com/repos/catsandspace/blog/keys{/key_id}","collaborators_url":"https://api.github.com/repos/catsandspace/blog/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/catsandspace/blog/teams","hooks_url":"https://api.github.com/repos/catsandspace/blog/hooks","issue_events_url":"https://api.github.com/repos/catsandspace/blog/issues/events{/number}","events_url":"https://api.github.com/repos/catsandspace/blog/events","assignees_url":"https://api.github.com/repos/catsandspace/blog/assignees{/user}","branches_url":"https://api.github.com/repos/catsandspace/blog/branches{/branch}","tags_url":"https://api.github.com/repos/catsandspace/blog/tags","blobs_url":"https://api.github.com/repos/catsandspace/blog/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/catsandspace/blog/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/catsandspace/blog/git/refs{/sha}","trees_url":"https://api.github.com/repos/catsandspace/blog/git/trees{/sha}","statuses_url":"https://api.github.com/repos/catsandspace/blog/statuses/{sha}","languages_url":"https://api.github.com/repos/catsandspace/blog/languages","stargazers_url":"https://api.github.com/repos/catsandspace/blog/stargazers","contributors_url":"https://api.github.com/repos/catsandspace/blog/contributors","subscribers_url":"https://api.github.com/repos/catsandspace/blog/subscribers","subscription_url":"https://api.github.com/repos/catsandspace/blog/subscription","commits_url":"https://api.github.com/repos/catsandspace/blog/commits{/sha}","git_commits_url":"https://api.github.com/repos/catsandspace/blog/git/commits{/sha}","comments_url":"https://api.github.com/repos/catsandspace/blog/comments{/number}","issue_comment_url":"https://api.github.com/repos/catsandspace/blog/issues/comments{/number}","contents_url":"https://api.github.com/repos/catsandspace/blog/contents/{+path}","compare_url":"https://api.github.com/repos/catsandspace/blog/compare/{base}...{head}","merges_url":"https://api.github.com/repos/catsandspace/blog/merges","archive_url":"https://api.github.com/repos/catsandspace/blog/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/catsandspace/blog/downloads","issues_url":"https://api.github.com/repos/catsandspace/blog/issues{/number}","pulls_url":"https://api.github.com/repos/catsandspace/blog/pulls{/number}","milestones_url":"https://api.github.com/repos/catsandspace/blog/milestones{/number}","notifications_url":"https://api.github.com/repos/catsandspace/blog/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/catsandspace/blog/labels{/name}","releases_url":"https://api.github.com/repos/catsandspace/blog/releases{/id}","deployments_url":"https://api.github.com/repos/catsandspace/blog/deployments","created_at":"2016-11-08T10:44:17Z","updated_at":"2016-11-08T11:07:46Z","pushed_at":"2016-12-03T17:11:26Z","git_url":"git://github.com/catsandspace/blog.git","ssh_url":"git@github.com:catsandspace/blog.git","clone_url":"https://github.com/catsandspace/blog.git","svn_url":"https://github.com/catsandspace/blog","homepage":null,"size":2536,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"catsandspace:master","ref":"master","sha":"fbbe3980c96447f8b989c2dea45712a45da1e580","user":{"login":"catsandspace","id":23334957,"avatar_url":"https://avatars.githubusercontent.com/u/23334957?v=3","gravatar_id":"","url":"https://api.github.com/users/catsandspace","html_url":"https://github.com/catsandspace","followers_url":"https://api.github.com/users/catsandspace/followers","following_url":"https://api.github.com/users/catsandspace/following{/other_user}","gists_url":"https://api.github.com/users/catsandspace/gists{/gist_id}","starred_url":"https://api.github.com/users/catsandspace/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/catsandspace/subscriptions","organizations_url":"https://api.github.com/users/catsandspace/orgs","repos_url":"https://api.github.com/users/catsandspace/repos","events_url":"https://api.github.com/users/catsandspace/events{/privacy}","received_events_url":"https://api.github.com/users/catsandspace/received_events","type":"Organization","site_admin":false},"repo":{"id":73176286,"name":"blog","full_name":"catsandspace/blog","owner":{"login":"catsandspace","id":23334957,"avatar_url":"https://avatars.githubusercontent.com/u/23334957?v=3","gravatar_id":"","url":"https://api.github.com/users/catsandspace","html_url":"https://github.com/catsandspace","followers_url":"https://api.github.com/users/catsandspace/followers","following_url":"https://api.github.com/users/catsandspace/following{/other_user}","gists_url":"https://api.github.com/users/catsandspace/gists{/gist_id}","starred_url":"https://api.github.com/users/catsandspace/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/catsandspace/subscriptions","organizations_url":"https://api.github.com/users/catsandspace/orgs","repos_url":"https://api.github.com/users/catsandspace/repos","events_url":"https://api.github.com/users/catsandspace/events{/privacy}","received_events_url":"https://api.github.com/users/catsandspace/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/catsandspace/blog","description":"A blog built with PHP done as a learning experience.","fork":false,"url":"https://api.github.com/repos/catsandspace/blog","forks_url":"https://api.github.com/repos/catsandspace/blog/forks","keys_url":"https://api.github.com/repos/catsandspace/blog/keys{/key_id}","collaborators_url":"https://api.github.com/repos/catsandspace/blog/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/catsandspace/blog/teams","hooks_url":"https://api.github.com/repos/catsandspace/blog/hooks","issue_events_url":"https://api.github.com/repos/catsandspace/blog/issues/events{/number}","events_url":"https://api.github.com/repos/catsandspace/blog/events","assignees_url":"https://api.github.com/repos/catsandspace/blog/assignees{/user}","branches_url":"https://api.github.com/repos/catsandspace/blog/branches{/branch}","tags_url":"https://api.github.com/repos/catsandspace/blog/tags","blobs_url":"https://api.github.com/repos/catsandspace/blog/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/catsandspace/blog/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/catsandspace/blog/git/refs{/sha}","trees_url":"https://api.github.com/repos/catsandspace/blog/git/trees{/sha}","statuses_url":"https://api.github.com/repos/catsandspace/blog/statuses/{sha}","languages_url":"https://api.github.com/repos/catsandspace/blog/languages","stargazers_url":"https://api.github.com/repos/catsandspace/blog/stargazers","contributors_url":"https://api.github.com/repos/catsandspace/blog/contributors","subscribers_url":"https://api.github.com/repos/catsandspace/blog/subscribers","subscription_url":"https://api.github.com/repos/catsandspace/blog/subscription","commits_url":"https://api.github.com/repos/catsandspace/blog/commits{/sha}","git_commits_url":"https://api.github.com/repos/catsandspace/blog/git/commits{/sha}","comments_url":"https://api.github.com/repos/catsandspace/blog/comments{/number}","issue_comment_url":"https://api.github.com/repos/catsandspace/blog/issues/comments{/number}","contents_url":"https://api.github.com/repos/catsandspace/blog/contents/{+path}","compare_url":"https://api.github.com/repos/catsandspace/blog/compare/{base}...{head}","merges_url":"https://api.github.com/repos/catsandspace/blog/merges","archive_url":"https://api.github.com/repos/catsandspace/blog/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/catsandspace/blog/downloads","issues_url":"https://api.github.com/repos/catsandspace/blog/issues{/number}","pulls_url":"https://api.github.com/repos/catsandspace/blog/pulls{/number}","milestones_url":"https://api.github.com/repos/catsandspace/blog/milestones{/number}","notifications_url":"https://api.github.com/repos/catsandspace/blog/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/catsandspace/blog/labels{/name}","releases_url":"https://api.github.com/repos/catsandspace/blog/releases{/id}","deployments_url":"https://api.github.com/repos/catsandspace/blog/deployments","created_at":"2016-11-08T10:44:17Z","updated_at":"2016-11-08T11:07:46Z","pushed_at":"2016-12-03T17:11:26Z","git_url":"git://github.com/catsandspace/blog.git","ssh_url":"git@github.com:catsandspace/blog.git","clone_url":"https://github.com/catsandspace/blog.git","svn_url":"https://github.com/catsandspace/blog","homepage":null,"size":2536,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/catsandspace/blog/pulls/113"},"html":{"href":"https://github.com/catsandspace/blog/pull/113"},"issue":{"href":"https://api.github.com/repos/catsandspace/blog/issues/113"},"comments":{"href":"https://api.github.com/repos/catsandspace/blog/issues/113/comments"},"review_comments":{"href":"https://api.github.com/repos/catsandspace/blog/pulls/113/comments"},"review_comment":{"href":"https://api.github.com/repos/catsandspace/blog/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/catsandspace/blog/pulls/113/commits"},"statuses":{"href":"https://api.github.com/repos/catsandspace/blog/statuses/78a3de8892968737eaabb001d8630d23a13f5cf2"}}}}
{"actor":{"display_login":"LJNGDAHL"}}