Skip to content

Commit f0ecf78

Browse files
krlvkelunik
authored andcommitted
Fix pool() usage in readme
1 parent 28615e3 commit f0ecf78

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,10 @@ More extensive code examples reside in the [`examples`](examples) directory.
4848

4949
```php
5050
\Amp\Loop::run(function() {
51+
$config = Amp\Mysql\ConnectionConfig::fromString("host=127.0.0.1 user=username password=password db=test");
52+
5153
/** @var \Amp\Mysql\Pool $pool */
52-
$pool = Amp\Mysql\pool("host=127.0.0.1 user=username password=password db=test");
54+
$pool = Amp\Mysql\pool($config);
5355

5456
/** @var \Amp\Mysql\Statement $statement */
5557
$statement = yield $pool->prepare("SELECT * FROM table_name WHERE id=?");

0 commit comments

Comments
 (0)