Mercurial > hg > ywww
diff php/read/getBookDetails.php @ 15:385ddd7c4b55 testing
use test_db.php to get mysqld_test instance
author | Henry S. Thompson <ht@inf.ed.ac.uk> |
---|---|
date | Sun, 19 Feb 2017 16:17:53 +0000 |
parents | 5aa24c984a3b |
children |
line wrap: on
line diff
--- a/php/read/getBookDetails.php Sun Feb 19 16:17:25 2017 +0000 +++ b/php/read/getBookDetails.php Sun Feb 19 16:17:53 2017 +0000 @@ -59,7 +59,7 @@ $output .= "<BookDetails>"; $proceed = true; - include "../../../private/db.php"; + include "../../../../private/db_test.php"; $query = "CALL b_getBookInfo('$isbn', $loc)"; //select Timestamp,Title,Author,Binding,DeweyDecimal,ImageURL,SalesRank,PublicationDate,Publisher,Genre1,Genre2,Genre3 from books where ISBN = '$isbn'"; @@ -98,7 +98,7 @@ } } mysqli_close($link); //do not remove. reset is needed otherwise mysqli_fetch_array doesn't work after first loop - include "../../../private/db.php"; + include "../../../../private/db_test.php"; if($proceed == true) { @@ -214,16 +214,16 @@ $xml = new SimpleXMLElement($out); $resName=$xml->getName(); $code=$xml->Error->Code; - file_put_contents('/var/ywww/debug/phpDebug',"Losing gBD: $resName, $code\n",FILE_APPEND); + file_put_contents('/var/test/ywww/debug/testDebug',"Losing gBD: $resName, $code\n",FILE_APPEND); if ($code=='RequestThrottled') { usleep(200000); // Try to reduce throttling until we get a // principled solution in place } else { - file_put_contents('/var/ywww/debug/phpDebug',"parms bd: ". + file_put_contents('/var/test/ywww/debug/testDebug',"parms bd: ". print_r($parameters,TRUE)."\n",FILE_APPEND); if ($code=="") { - file_put_contents('/var/ywww/debug/phpDebug',"error elt:\n$out\n",FILE_APPEND); + file_put_contents('/var/test/ywww/debug/testDebug',"error elt:\n$out\n",FILE_APPEND); } } } @@ -232,10 +232,10 @@ //use this xml to pull out the necessary information and save it set_error_handler(function () { global $out,$isbn; - file_put_contents('/var/ywww/debug/phpDebug', + file_put_contents('/var/test/ywww/debug/testDebug', "Caught one bd: ".$isbn, FILE_APPEND); - file_put_contents('/var/ywww/debug/phpDebug', + file_put_contents('/var/test/ywww/debug/testDebug', print_r($out, TRUE)."\n", FILE_APPEND); } ); @@ -322,7 +322,7 @@ $salesRank = "null"; mysqli_close($link); //do not remove. reset is needed otherwise mysqli_fetch_array doesn't work after first loop - include "../../../private/db.php"; + include "../../../../private/db_test.php"; $title = strtr($title, '"', "'"); $queryInsert = "CALL b_addNewBook(\"$isbn\",\"$title\", \"$author\",\"$binding\",\"$imageURL\", $dewey, $salesRank,\"$pubDate\",\"$publisher\",$g1,$g2,$g3,$loc)";