How can I complete the database.php script? [closed]
public function __construct($hostname, $username, $password, $dbname, $port = 3306) {
$this->hostname = $hostname;
$this->port = $port;
$this->username = $username;
$this->password = $password;
$this->dbname = $dbname;
// connect to the DB
if (!$this->connect()) {
die(mysqli_error($this->dblink));
}
// we will operate in UTF8
mysqli_query($this->dblink,"SET NAMES 'UTF8'");
}
/**
* {@inheritDoc}
* @see AppDatabaseIDbConnection::connect()
*/
public function connect() {
// try to connect
try {
$this->dblink = mysqli_connect( $this->fdb24.awardspace.net, $this->username, $this->password, $this->dbname, $this->port );
} catch (Exception $exception) {
$this->dblink = mysqli_connect( $this->hostname . ':' . $this->port, $this->username, $this->password );
How can I complete this?
$this->dblink = mysqli_connect( $this->fdb24.awardspace.net,
$this->username, $this->password, $this->dbname, $this->port );
in the script:
Database Host: fdb24.awardspace.net ,
Database Name: 2886018_jak ,
Database User: 2886018_jak ,
Port: 3306,
Database Password: justone12
php
closed as unclear what you're asking by miken32, Funk Forty Niner, Davіd, mario, halfer Nov 20 at 21:55
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
add a comment |
public function __construct($hostname, $username, $password, $dbname, $port = 3306) {
$this->hostname = $hostname;
$this->port = $port;
$this->username = $username;
$this->password = $password;
$this->dbname = $dbname;
// connect to the DB
if (!$this->connect()) {
die(mysqli_error($this->dblink));
}
// we will operate in UTF8
mysqli_query($this->dblink,"SET NAMES 'UTF8'");
}
/**
* {@inheritDoc}
* @see AppDatabaseIDbConnection::connect()
*/
public function connect() {
// try to connect
try {
$this->dblink = mysqli_connect( $this->fdb24.awardspace.net, $this->username, $this->password, $this->dbname, $this->port );
} catch (Exception $exception) {
$this->dblink = mysqli_connect( $this->hostname . ':' . $this->port, $this->username, $this->password );
How can I complete this?
$this->dblink = mysqli_connect( $this->fdb24.awardspace.net,
$this->username, $this->password, $this->dbname, $this->port );
in the script:
Database Host: fdb24.awardspace.net ,
Database Name: 2886018_jak ,
Database User: 2886018_jak ,
Port: 3306,
Database Password: justone12
php
closed as unclear what you're asking by miken32, Funk Forty Niner, Davіd, mario, halfer Nov 20 at 21:55
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
3
Why is “Can someone help me?” not an actual question?.
– Funk Forty Niner
Nov 19 at 22:27
$this->fdb24.awardspace.net
should be$this->hostname
in the connection
– user3783243
Nov 19 at 22:48
Please try to narrow this question down. What are you actually stuck on?
– halfer
Nov 20 at 22:00
Use this edit link to make your changes.
– halfer
Nov 20 at 22:01
add a comment |
public function __construct($hostname, $username, $password, $dbname, $port = 3306) {
$this->hostname = $hostname;
$this->port = $port;
$this->username = $username;
$this->password = $password;
$this->dbname = $dbname;
// connect to the DB
if (!$this->connect()) {
die(mysqli_error($this->dblink));
}
// we will operate in UTF8
mysqli_query($this->dblink,"SET NAMES 'UTF8'");
}
/**
* {@inheritDoc}
* @see AppDatabaseIDbConnection::connect()
*/
public function connect() {
// try to connect
try {
$this->dblink = mysqli_connect( $this->fdb24.awardspace.net, $this->username, $this->password, $this->dbname, $this->port );
} catch (Exception $exception) {
$this->dblink = mysqli_connect( $this->hostname . ':' . $this->port, $this->username, $this->password );
How can I complete this?
$this->dblink = mysqli_connect( $this->fdb24.awardspace.net,
$this->username, $this->password, $this->dbname, $this->port );
in the script:
Database Host: fdb24.awardspace.net ,
Database Name: 2886018_jak ,
Database User: 2886018_jak ,
Port: 3306,
Database Password: justone12
php
public function __construct($hostname, $username, $password, $dbname, $port = 3306) {
$this->hostname = $hostname;
$this->port = $port;
$this->username = $username;
$this->password = $password;
$this->dbname = $dbname;
// connect to the DB
if (!$this->connect()) {
die(mysqli_error($this->dblink));
}
// we will operate in UTF8
mysqli_query($this->dblink,"SET NAMES 'UTF8'");
}
/**
* {@inheritDoc}
* @see AppDatabaseIDbConnection::connect()
*/
public function connect() {
// try to connect
try {
$this->dblink = mysqli_connect( $this->fdb24.awardspace.net, $this->username, $this->password, $this->dbname, $this->port );
} catch (Exception $exception) {
$this->dblink = mysqli_connect( $this->hostname . ':' . $this->port, $this->username, $this->password );
How can I complete this?
$this->dblink = mysqli_connect( $this->fdb24.awardspace.net,
$this->username, $this->password, $this->dbname, $this->port );
in the script:
Database Host: fdb24.awardspace.net ,
Database Name: 2886018_jak ,
Database User: 2886018_jak ,
Port: 3306,
Database Password: justone12
php
php
edited Nov 20 at 21:55
halfer
14.3k758108
14.3k758108
asked Nov 19 at 22:23
Atom Ion
11
11
closed as unclear what you're asking by miken32, Funk Forty Niner, Davіd, mario, halfer Nov 20 at 21:55
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
closed as unclear what you're asking by miken32, Funk Forty Niner, Davіd, mario, halfer Nov 20 at 21:55
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
3
Why is “Can someone help me?” not an actual question?.
– Funk Forty Niner
Nov 19 at 22:27
$this->fdb24.awardspace.net
should be$this->hostname
in the connection
– user3783243
Nov 19 at 22:48
Please try to narrow this question down. What are you actually stuck on?
– halfer
Nov 20 at 22:00
Use this edit link to make your changes.
– halfer
Nov 20 at 22:01
add a comment |
3
Why is “Can someone help me?” not an actual question?.
– Funk Forty Niner
Nov 19 at 22:27
$this->fdb24.awardspace.net
should be$this->hostname
in the connection
– user3783243
Nov 19 at 22:48
Please try to narrow this question down. What are you actually stuck on?
– halfer
Nov 20 at 22:00
Use this edit link to make your changes.
– halfer
Nov 20 at 22:01
3
3
Why is “Can someone help me?” not an actual question?.
– Funk Forty Niner
Nov 19 at 22:27
Why is “Can someone help me?” not an actual question?.
– Funk Forty Niner
Nov 19 at 22:27
$this->fdb24.awardspace.net
should be $this->hostname
in the connection– user3783243
Nov 19 at 22:48
$this->fdb24.awardspace.net
should be $this->hostname
in the connection– user3783243
Nov 19 at 22:48
Please try to narrow this question down. What are you actually stuck on?
– halfer
Nov 20 at 22:00
Please try to narrow this question down. What are you actually stuck on?
– halfer
Nov 20 at 22:00
Use this edit link to make your changes.
– halfer
Nov 20 at 22:01
Use this edit link to make your changes.
– halfer
Nov 20 at 22:01
add a comment |
1 Answer
1
active
oldest
votes
$this->fdb24.awardspace.net
Doesn't seem to exist, maybe try:
mysqli_connect( 'fdb24.awardspace.net',
$this->username,
$this->password,
$this->dbname,
$this->port );
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
$this->fdb24.awardspace.net
Doesn't seem to exist, maybe try:
mysqli_connect( 'fdb24.awardspace.net',
$this->username,
$this->password,
$this->dbname,
$this->port );
add a comment |
$this->fdb24.awardspace.net
Doesn't seem to exist, maybe try:
mysqli_connect( 'fdb24.awardspace.net',
$this->username,
$this->password,
$this->dbname,
$this->port );
add a comment |
$this->fdb24.awardspace.net
Doesn't seem to exist, maybe try:
mysqli_connect( 'fdb24.awardspace.net',
$this->username,
$this->password,
$this->dbname,
$this->port );
$this->fdb24.awardspace.net
Doesn't seem to exist, maybe try:
mysqli_connect( 'fdb24.awardspace.net',
$this->username,
$this->password,
$this->dbname,
$this->port );
answered Nov 19 at 22:48
Justin Schwimmer
1249
1249
add a comment |
add a comment |
3
Why is “Can someone help me?” not an actual question?.
– Funk Forty Niner
Nov 19 at 22:27
$this->fdb24.awardspace.net
should be$this->hostname
in the connection– user3783243
Nov 19 at 22:48
Please try to narrow this question down. What are you actually stuck on?
– halfer
Nov 20 at 22:00
Use this edit link to make your changes.
– halfer
Nov 20 at 22:01