{"action":"created","issue":{"url":"https://api.github.com/repos/swoole/swoole-src/issues/2128","repository_url":"https://api.github.com/repos/swoole/swoole-src","labels_url":"https://api.github.com/repos/swoole/swoole-src/issues/2128/labels{/name}","comments_url":"https://api.github.com/repos/swoole/swoole-src/issues/2128/comments","events_url":"https://api.github.com/repos/swoole/swoole-src/issues/2128/events","html_url":"https://github.com/swoole/swoole-src/issues/2128","id":381964219,"node_id":"MDU6SXNzdWUzODE5NjQyMTk=","number":2128,"title":"Async Mysqli Prepare","user":{"login":"jobs-git","id":13552004,"node_id":"MDQ6VXNlcjEzNTUyMDA0","avatar_url":"https://avatars0.githubusercontent.com/u/13552004?v=4","gravatar_id":"","url":"https://api.github.com/users/jobs-git","html_url":"https://github.com/jobs-git","followers_url":"https://api.github.com/users/jobs-git/followers","following_url":"https://api.github.com/users/jobs-git/following{/other_user}","gists_url":"https://api.github.com/users/jobs-git/gists{/gist_id}","starred_url":"https://api.github.com/users/jobs-git/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jobs-git/subscriptions","organizations_url":"https://api.github.com/users/jobs-git/orgs","repos_url":"https://api.github.com/users/jobs-git/repos","events_url":"https://api.github.com/users/jobs-git/events{/privacy}","received_events_url":"https://api.github.com/users/jobs-git/received_events","type":"User","site_admin":false},"labels":[{"id":9887903,"node_id":"MDU6TGFiZWw5ODg3OTAz","url":"https://api.github.com/repos/swoole/swoole-src/labels/question","name":"question","color":"cc317c","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2018-11-18T14:15:21Z","updated_at":"2018-11-18T15:50:42Z","closed_at":"2018-11-18T15:43:31Z","author_association":"NONE","body":"The documentation discusses async mysql request as\r\n```php\r\n<?php\r\n$db = new swoole_mysql;\r\n$server = array(\r\n    'host' => '192.168.56.102',\r\n    'port' => 3306,\r\n    'user' => 'test',\r\n    'password' => 'test',\r\n    'database' => 'test',\r\n    'charset' => 'utf8',\r\n    'timeout' => 2,\r\n);\r\n\r\n$db->connect($server, function ($db, $r) {\r\n    if ($r === false) {\r\n        var_dump($db->connect_errno, $db->connect_error);\r\n        die;\r\n    }\r\n    $sql = 'show tables';\r\n    $db->query($sql, function(swoole_mysql $db, $r) {\r\n        if ($r === false)\r\n        {\r\n            var_dump($db->error, $db->errno);\r\n        }\r\n        elseif ($r === true )\r\n        {\r\n            var_dump($db->affected_rows, $db->insert_id);\r\n        }\r\n        var_dump($r);\r\n        $db->close();\r\n    });\r\n});\r\n```\r\n\r\nHow to carry out the same async functionality for Mysql Prepared Statement?"},"comment":{"url":"https://api.github.com/repos/swoole/swoole-src/issues/comments/439702775","html_url":"https://github.com/swoole/swoole-src/issues/2128#issuecomment-439702775","issue_url":"https://api.github.com/repos/swoole/swoole-src/issues/2128","id":439702775,"node_id":"MDEyOklzc3VlQ29tbWVudDQzOTcwMjc3NQ==","user":{"login":"flddr","id":42785945,"node_id":"MDQ6VXNlcjQyNzg1OTQ1","avatar_url":"https://avatars2.githubusercontent.com/u/42785945?v=4","gravatar_id":"","url":"https://api.github.com/users/flddr","html_url":"https://github.com/flddr","followers_url":"https://api.github.com/users/flddr/followers","following_url":"https://api.github.com/users/flddr/following{/other_user}","gists_url":"https://api.github.com/users/flddr/gists{/gist_id}","starred_url":"https://api.github.com/users/flddr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flddr/subscriptions","organizations_url":"https://api.github.com/users/flddr/orgs","repos_url":"https://api.github.com/users/flddr/repos","events_url":"https://api.github.com/users/flddr/events{/privacy}","received_events_url":"https://api.github.com/users/flddr/received_events","type":"User","site_admin":false},"created_at":"2018-11-18T15:50:42Z","updated_at":"2018-11-18T15:50:42Z","author_association":"NONE","body":"Maybe, your keyword is _Connection Pool_ :wink: "}}
{"actor":{"display_login":"flddr"}}