Skip to content

Commit 79aad26

Browse files
committed
fix postgresql
1 parent 01978cd commit 79aad26

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

HelloWorld.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ public function __construct(PDO $pdo)
1414

1515
public function hello($what = 'World')
1616
{
17-
$sql = "INSERT INTO hello_world_test.hello VALUES (" . $this->pdo->quote($what) . ")";
17+
$sql = "INSERT INTO hello VALUES (" . $this->pdo->quote($what) . ")";
1818
$this->pdo->query($sql);
1919
return "Hello $what";
2020
}
2121

2222

2323
public function what()
2424
{
25-
$sql = "SELECT what FROM hello_world_test.hello";
25+
$sql = "SELECT what FROM hello";
2626
$stmt = $this->pdo->query($sql);
2727
return $stmt->fetchColumn();
2828
}

Tests/HelloWorldTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ public function setUp()
1111
{
1212
$this->pdo = new PDO($GLOBALS['db_dsn'], $GLOBALS['db_username'], $GLOBALS['db_password']);
1313
$this->pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
14-
$this->pdo->query("CREATE TABLE hello_world_test.hello (what VARCHAR(50) NOT NULL)");
14+
$this->pdo->query("CREATE TABLE hello (what VARCHAR(50) NOT NULL)");
1515
}
1616

1717
public function tearDown()
1818
{
19-
$this->pdo->query("DROP TABLE hello_world_test.hello");
19+
$this->pdo->query("DROP TABLE hello");
2020
}
2121

2222
public function testHelloWorld()

0 commit comments

Comments
 (0)