{"action":"created","issue":{"url":"https://api.github.com/repos/joshcam/PHP-MySQLi-Database-Class/issues/245","labels_url":"https://api.github.com/repos/joshcam/PHP-MySQLi-Database-Class/issues/245/labels{/name}","comments_url":"https://api.github.com/repos/joshcam/PHP-MySQLi-Database-Class/issues/245/comments","events_url":"https://api.github.com/repos/joshcam/PHP-MySQLi-Database-Class/issues/245/events","html_url":"https://github.com/joshcam/PHP-MySQLi-Database-Class/issues/245","id":90464981,"number":245,"title":"WHERE return first record","user":{"login":"murderaven","id":13022321,"avatar_url":"https://avatars.githubusercontent.com/u/13022321?v=3","gravatar_id":"","url":"https://api.github.com/users/murderaven","html_url":"https://github.com/murderaven","followers_url":"https://api.github.com/users/murderaven/followers","following_url":"https://api.github.com/users/murderaven/following{/other_user}","gists_url":"https://api.github.com/users/murderaven/gists{/gist_id}","starred_url":"https://api.github.com/users/murderaven/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/murderaven/subscriptions","organizations_url":"https://api.github.com/users/murderaven/orgs","repos_url":"https://api.github.com/users/murderaven/repos","events_url":"https://api.github.com/users/murderaven/events{/privacy}","received_events_url":"https://api.github.com/users/murderaven/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-06-23T18:59:57Z","updated_at":"2015-06-23T19:16:20Z","closed_at":null,"body":"Hi,\r\n\r\nI've check user ID top of the page, if its not defined or its not numeric value return 0 like that;\r\n\r\n$ID = ((!isset($_GET['ID']) || !is_numeric($_GET['ID'])) ? 0:intval($_GET['ID']));\r\n\r\nin case this statement everytime return first record from database table when ID value 0;\r\n\r\n$db->where('user_id',$ID);\r\n$records = $db->getOne('users');\r\n\r\nWhats wrong?"},"comment":{"url":"https://api.github.com/repos/joshcam/PHP-MySQLi-Database-Class/issues/comments/114614680","html_url":"https://github.com/joshcam/PHP-MySQLi-Database-Class/issues/245#issuecomment-114614680","issue_url":"https://api.github.com/repos/joshcam/PHP-MySQLi-Database-Class/issues/245","id":114614680,"user":{"login":"murderaven","id":13022321,"avatar_url":"https://avatars.githubusercontent.com/u/13022321?v=3","gravatar_id":"","url":"https://api.github.com/users/murderaven","html_url":"https://github.com/murderaven","followers_url":"https://api.github.com/users/murderaven/followers","following_url":"https://api.github.com/users/murderaven/following{/other_user}","gists_url":"https://api.github.com/users/murderaven/gists{/gist_id}","starred_url":"https://api.github.com/users/murderaven/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/murderaven/subscriptions","organizations_url":"https://api.github.com/users/murderaven/orgs","repos_url":"https://api.github.com/users/murderaven/repos","events_url":"https://api.github.com/users/murderaven/events{/privacy}","received_events_url":"https://api.github.com/users/murderaven/received_events","type":"User","site_admin":false},"created_at":"2015-06-23T19:16:20Z","updated_at":"2015-06-23T19:16:20Z","body":"There 2 row available in table, also user_id column unique primary key. I've resolve it with \r\n\r\n$ID = ((!isset($_GET['ID']) || !is_numeric($_GET['ID'])) ? -1:intval($_GET['ID']));\r\n\r\nand rawQuery works too. But I must change all pages like that :/"}}