annotate db.php @ 2:eec825432669 default tip

parameterise db path
author Charlie Root
date Sun, 27 Jan 2019 14:51:23 -0500
parents 8e907c11207a
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
8e907c11207a using test db
Charlie Root
parents:
diff changeset
1 <?PHP
8e907c11207a using test db
Charlie Root
parents:
diff changeset
2 global $link;
2
eec825432669 parameterise db path
Charlie Root
parents: 0
diff changeset
3 $socket = "/run/mysqld".getenv("TEST_SUFFIX")."/mysqld.sock";
0
8e907c11207a using test db
Charlie Root
parents:
diff changeset
4 $link = mysqli_connect("localhost","bookwhac","Wedding2010","bookwhac_books",
2
eec825432669 parameterise db path
Charlie Root
parents: 0
diff changeset
5 null,$socket);
0
8e907c11207a using test db
Charlie Root
parents:
diff changeset
6 if (is_bool($link) or is_null($link)) {
8e907c11207a using test db
Charlie Root
parents:
diff changeset
7 include_once "dlog.php";
2
eec825432669 parameterise db path
Charlie Root
parents: 0
diff changeset
8 dl("connect failed: |$link| |$socket|\n");
0
8e907c11207a using test db
Charlie Root
parents:
diff changeset
9 }
8e907c11207a using test db
Charlie Root
parents:
diff changeset
10 include_once "mq.php";
8e907c11207a using test db
Charlie Root
parents:
diff changeset
11 ?>