Skip to content

Commit 3b7013d

Browse files
committed
Update example
1 parent e4b65f0 commit 3b7013d

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

examples/2-simple-query.php

+2-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
require 'support/bootstrap.php';
44

55
use Amp\Mysql;
6-
use Amp\Sql\ResultSet;
76

87
Amp\Loop::run(function () {
98
$db = Mysql\pool(Mysql\ConnectionConfig::fromString("host=".DB_HOST.";user=".DB_USER.";pass=".DB_PASS.";db=".DB_NAME));
@@ -12,8 +11,8 @@
1211
$result = yield $db->query("SELECT 1 AS value");
1312

1413
while (yield $result->advance()) {
15-
$row = $result->getCurrent(ResultSet::FETCH_ARRAY);
16-
\var_dump($row[0]);
14+
$row = $result->getCurrent();
15+
\var_dump($row['value']);
1716
}
1817

1918
$db->close();

0 commit comments

Comments
 (0)