We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e4b65f0 commit 3b7013dCopy full SHA for 3b7013d
examples/2-simple-query.php
@@ -3,7 +3,6 @@
3
require 'support/bootstrap.php';
4
5
use Amp\Mysql;
6
-use Amp\Sql\ResultSet;
7
8
Amp\Loop::run(function () {
9
$db = Mysql\pool(Mysql\ConnectionConfig::fromString("host=".DB_HOST.";user=".DB_USER.";pass=".DB_PASS.";db=".DB_NAME));
@@ -12,8 +11,8 @@
12
11
$result = yield $db->query("SELECT 1 AS value");
13
14
while (yield $result->advance()) {
15
- $row = $result->getCurrent(ResultSet::FETCH_ARRAY);
16
- \var_dump($row[0]);
+ $row = $result->getCurrent();
+ \var_dump($row['value']);
17
}
18
19
$db->close();
0 commit comments