{"action":"created","issue":{"url":"https://api.github.com/repos/joshcam/PHP-MySQLi-Database-Class/issues/439","repository_url":"https://api.github.com/repos/joshcam/PHP-MySQLi-Database-Class","labels_url":"https://api.github.com/repos/joshcam/PHP-MySQLi-Database-Class/issues/439/labels{/name}","comments_url":"https://api.github.com/repos/joshcam/PHP-MySQLi-Database-Class/issues/439/comments","events_url":"https://api.github.com/repos/joshcam/PHP-MySQLi-Database-Class/issues/439/events","html_url":"https://github.com/joshcam/PHP-MySQLi-Database-Class/issues/439","id":132171216,"number":439,"title":"delete() returns false, when affected rows is zero","user":{"login":"pieczarkazsolt","id":8823609,"avatar_url":"https://avatars.githubusercontent.com/u/8823609?v=3","gravatar_id":"","url":"https://api.github.com/users/pieczarkazsolt","html_url":"https://github.com/pieczarkazsolt","followers_url":"https://api.github.com/users/pieczarkazsolt/followers","following_url":"https://api.github.com/users/pieczarkazsolt/following{/other_user}","gists_url":"https://api.github.com/users/pieczarkazsolt/gists{/gist_id}","starred_url":"https://api.github.com/users/pieczarkazsolt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pieczarkazsolt/subscriptions","organizations_url":"https://api.github.com/users/pieczarkazsolt/orgs","repos_url":"https://api.github.com/users/pieczarkazsolt/repos","events_url":"https://api.github.com/users/pieczarkazsolt/events{/privacy}","received_events_url":"https://api.github.com/users/pieczarkazsolt/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-02-08T15:22:59Z","updated_at":"2016-06-27T07:16:47Z","closed_at":null,"body":"I have 2 tables\r\nUSERS:\r\nid | username | name\r\n1 | test_1 | John Doe\r\n2 | test_2 | Test User 2\r\n\r\nLOG:\r\nuser_id | log_msg | date\r\n2 | delete task | 2016....\r\n2 | create task | 2016....\r\n\r\nMy problem: When I delete John Doe's LOG entries, the query returns with _false_:\r\n\r\n```php\r\n$db->where('user_id', 2);\r\nif($db->delete('log')) echo 'successfully deleted';\r\n```\r\n(i think ) In this case, the _false_ is a wrong value\r\n\r\n```php\r\npublic function delete($tableName, $numRows = null)\r\n{\r\n...\r\nreturn ($stmt->affected_rows > 0)\r\n}\r\n```\r\n\r\nthx"},"comment":{"url":"https://api.github.com/repos/joshcam/PHP-MySQLi-Database-Class/issues/comments/228670396","html_url":"https://github.com/joshcam/PHP-MySQLi-Database-Class/issues/439#issuecomment-228670396","issue_url":"https://api.github.com/repos/joshcam/PHP-MySQLi-Database-Class/issues/439","id":228670396,"user":{"login":"Noneatme","id":6305695,"avatar_url":"https://avatars.githubusercontent.com/u/6305695?v=3","gravatar_id":"","url":"https://api.github.com/users/Noneatme","html_url":"https://github.com/Noneatme","followers_url":"https://api.github.com/users/Noneatme/followers","following_url":"https://api.github.com/users/Noneatme/following{/other_user}","gists_url":"https://api.github.com/users/Noneatme/gists{/gist_id}","starred_url":"https://api.github.com/users/Noneatme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Noneatme/subscriptions","organizations_url":"https://api.github.com/users/Noneatme/orgs","repos_url":"https://api.github.com/users/Noneatme/repos","events_url":"https://api.github.com/users/Noneatme/events{/privacy}","received_events_url":"https://api.github.com/users/Noneatme/received_events","type":"User","site_admin":false},"created_at":"2016-06-27T07:16:46Z","updated_at":"2016-06-27T07:16:46Z","body":"There seems to be some errors in your code. I tired to reproduce your problem, but I failed to do so.\r\n\r\n`require_once  \"MysqliDb.php\";\r\n\r\n$db = new MysqliDb ('localhost', 'noneatme', '12345', 'db_test');\r\n$db->where('user_id', 2);\r\nif($db->delete('log')) echo 'successfully deleted';`\r\n\r\n> php test.php\r\n> successfully deleted\r\n\r\nDo you have more info, e.G. more code lines?"}}
{"actor":{"display_login":"Noneatme"}}