Mercurial > hg > ywww
diff php/read/getLinkedBooks.php @ 46:b7376319d25a
centralise db query even more
author | Charlie Root |
---|---|
date | Sun, 06 Jan 2019 12:15:42 -0500 |
parents | 077b0a0a3e6d |
children | a67bf725e87b |
line wrap: on
line diff
--- a/php/read/getLinkedBooks.php Sun Jan 06 08:09:47 2019 -0500 +++ b/php/read/getLinkedBooks.php Sun Jan 06 12:15:42 2019 -0500 @@ -1,4 +1,5 @@ <?PHP + if(!isset($ret)) { header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); @@ -7,6 +8,7 @@ header("Cache-Control: post-check=0, pre-check=0", false); header("Pragma: no-cache"); } + $linkedBooks = 0; include "similar.php"; @@ -23,20 +25,20 @@ $loc = 1; //default location is 1 } +include "private/db.php"; + if(isset($ret)) { - include "../../private/db.php"; $loc = $countryCode; //passed from index.php when googlebot is crawling } else { - include "../../../private/db.php"; $ret = 0; } $query = "CALL b_getLinksForISBN('$isbn',$loc)"; //echo $query; -$results = mysqli_query($link, $query) or exit( mysqli_error( $link )); +$results = my_query($query,'glb'); $output = "<?xml version=\"1.0\"?>"; $output .= "<results>";