{"issue":{"user":{"id":7937,"login":"Abe","url":"https://api.github.com/users/Abe","gravatar_id":"4e1d54951a42e7268fc90b60d0fa7d2a","avatar_url":"https://secure.gravatar.com/avatar/4e1d54951a42e7268fc90b60d0fa7d2a?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"milestone":null,"created_at":"2011-12-22T18:54:11Z","title":"mysql insert execute","updated_at":"2011-12-23T01:15:24Z","labels":[],"state":"closed","id":2640428,"html_url":"https://github.com/mikecao/sparrow/issues/1","pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"closed_at":"2011-12-23T01:15:24Z","number":1,"body":"There is an error when I try to insert data to the database.\r\n**Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in sparrow.php on line 809**\r\n\r\n```php\r\n<?php\r\nrequire 'sparrow.php';\r\n\r\n$db = new Sparrow();\r\n$db->setDb('mysql://user:pass@localhost/database');\r\n        \r\n$data = array('name'=>'Abe');\r\n$db->from('users')->insert($data)->execute();\r\n```\r\n\r\n* Mac OS X 10.6.8\r\n* PHP 5.3.8\r\n* Apache 2.2.20\r\n* MySQL 5.5.15","url":"https://api.github.com/repos/mikecao/sparrow/issues/1","comments":2,"assignee":null},"action":"closed"}