view mq.php @ 50:99a730ffeaf6

more parameterisation
author Charlie Root
date Sun, 27 Jan 2019 14:24:02 -0500
parents a67bf725e87b
children dd93cb4b77ad
line wrap: on
line source

<?php
function my_query($q,$d='x')
{
  global $link;
  $res = mysqli_query($link, $q);
  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);
  }
}
?>