Mercurial > hg > ywww
view mq.php @ 57:7f90ac957713
necessary when included inside a function
| author | Charlie Root |
|---|---|
| date | Sun, 09 Jun 2019 06:47:19 -0400 |
| parents | a04fc91bbd95 |
| children |
line wrap: on
line source
<?php function my_query($q,$d='x') { global $link; $res = mysqli_query($link, $q); include_once "dlog.php"; dl("query from $d: ".is_bool($res) ? $res : mysqli_num_rows( $res )." $q\n"); if ($res) { return $res; } else { $err=mysqli_error( $link ); mysqli_close($link); include_once "dlog.php"; dl("query from $d failed: $q\n$err\n"); exit($err); } } ?>
