Skip to content

Commit 97be5b3

Browse files
author
joshbenhamou
committed
Remove wrong localhost
1 parent 36451f9 commit 97be5b3

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

dbObject.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ require_once("libs/MysqliDb.php");
1111
require_once("libs/dbObject.php");
1212

1313
// db instance
14-
$db = new Mysqlidb('localhost:3306', 'user', '', 'testdb');
14+
$db = new Mysqlidb('localhost', 'user', '', 'testdb');
1515
// enable class autoloading
1616
dbObject::autoload("models");
1717
```

index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ function action_mod () {
8080
$data = $db->getOne ("users");
8181
}
8282

83-
$db = new Mysqlidb ('localhost:3306', 'root', '', 'testdb');
83+
$db = new Mysqlidb ('localhost', 'root', '', 'testdb');
8484
if ($_GET) {
8585
$f = "action_".$_GET['action'];
8686
if (function_exists ($f)) {

tests/dbObjectTests.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
require_once ("../MysqliDb.php");
44
require_once ("../dbObject.php");
55

6-
$db = new Mysqlidb('localhost:3306', 'root', '', 'testdb');
6+
$db = new Mysqlidb('localhost', 'root', '', 'testdb');
77
$prefix = 't_';
88
$db->setPrefix($prefix);
99
dbObject::autoload ("models");

tests/mysqliDbTests.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ function pretty_print($array) {
99
}
1010

1111
$prefix = 't_';
12-
$db = new Mysqlidb('localhost:3306', 'root', '', 'testdb');
12+
$db = new Mysqlidb('localhost', 'root', '', 'testdb');
1313
if(!$db) die("Database error");
1414

15-
$mysqli = new mysqli ('localhost:3306', 'root', '', 'testdb');
15+
$mysqli = new mysqli ('localhost', 'root', '', 'testdb');
1616
$db = new Mysqlidb($mysqli);
1717

1818
$db = new Mysqlidb(Array (
19-
'host' => 'localhost:3306',
19+
'host' => 'localhost',
2020
'username' => 'root',
2121
'password' => '',
2222
'db' => 'testdb',

0 commit comments

Comments
 (0)