{"action":"opened","issue":{"url":"https://api.github.com/repos/slimphp/Slim/issues/1477","labels_url":"https://api.github.com/repos/slimphp/Slim/issues/1477/labels{/name}","comments_url":"https://api.github.com/repos/slimphp/Slim/issues/1477/comments","events_url":"https://api.github.com/repos/slimphp/Slim/issues/1477/events","html_url":"https://github.com/slimphp/Slim/issues/1477","id":104452856,"number":1477,"title":"my function returns blank but db have so many records","user":{"login":"vinita90","id":10958103,"avatar_url":"https://avatars.githubusercontent.com/u/10958103?v=3","gravatar_id":"","url":"https://api.github.com/users/vinita90","html_url":"https://github.com/vinita90","followers_url":"https://api.github.com/users/vinita90/followers","following_url":"https://api.github.com/users/vinita90/following{/other_user}","gists_url":"https://api.github.com/users/vinita90/gists{/gist_id}","starred_url":"https://api.github.com/users/vinita90/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vinita90/subscriptions","organizations_url":"https://api.github.com/users/vinita90/orgs","repos_url":"https://api.github.com/users/vinita90/repos","events_url":"https://api.github.com/users/vinita90/events{/privacy}","received_events_url":"https://api.github.com/users/vinita90/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-09-02T10:47:05Z","updated_at":"2015-09-02T10:47:05Z","closed_at":null,"body":"function getProfile() {\r\n\t$sql = \"select * from ver3_users u join ver3_data_profiles  p on u.ID = p.profile_id\";\r\n\ttry {\r\n\t\t$db = getDB();\r\n\t\t$stmt = $db->query($sql);  \r\n\t\t$profiles = $stmt->fetchAll(PDO::FETCH_OBJ);\r\n\t\t//print_r($profiles);\r\n\t\t$db = null;\r\n\t\techo '{\"profiles\": ' . json_encode($profiles) . '}';\r\n\t} catch(PDOException $e) {\r\n\t    //error_log($e->getMessage(), 3, '/var/tmp/php.log');\r\n\t\techo '{\"error\":{\"text\":'. $e->getMessage() .'}}'; \r\n\t}\r\n}"}}