Mercurial > hg > private
changeset 2:eec825432669 default tip
parameterise db path
author | Charlie Root |
---|---|
date | Sun, 27 Jan 2019 14:51:23 -0500 |
parents | d70fd5290b07 |
children | |
files | db.php |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/db.php Wed Jan 16 14:38:31 2019 -0500 +++ b/db.php Sun Jan 27 14:51:23 2019 -0500 @@ -1,10 +1,11 @@ <?PHP global $link; +$socket = "/run/mysqld".getenv("TEST_SUFFIX")."/mysqld.sock"; $link = mysqli_connect("localhost","bookwhac","Wedding2010","bookwhac_books", - null,"/run/mysqld_test/mysqld.sock"); + null,$socket); if (is_bool($link) or is_null($link)) { include_once "dlog.php"; - dl("connect failed: |$link|\n"); + dl("connect failed: |$link| |$socket|\n"); } include_once "mq.php"; ?>