comparison mq.php @ 53:dd93cb4b77ad

more debugging (too much for production), fallback to DB if getBookDetails is knocked back by Amazon
author Charlie Root
date Thu, 06 Jun 2019 16:37:20 -0400
parents a67bf725e87b
children a04fc91bbd95
comparison
equal deleted inserted replaced
52:d9dd9705e724 53:dd93cb4b77ad
1 <?php 1 <?php
2 function my_query($q,$d='x') 2 function my_query($q,$d='x')
3 { 3 {
4 global $link; 4 global $link;
5 $res = mysqli_query($link, $q); 5 $res = mysqli_query($link, $q);
6 include_once "dlog.php";
7 dl("query from $d: ".mysqli_num_rows( $res )." $q\n");
6 if ($res) { 8 if ($res) {
7 return $res; 9 return $res;
8 } 10 }
9 else { 11 else {
10 $err=mysqli_error( $link ); 12 $err=mysqli_error( $link );