<?php
/*
* isExistID.php
* http://tasuke.dna.affrc.go.jp/
*
* Author: Norio Tabei 
*
* Copyright (c) 2020 National Institute of Agrobiological Sciences
*
*/
  require '../conf/config.php';
  require './common.php';

  //////////////////////////////////  Connecting with DB
  if( !$conn = new mysqli($host, $user, $pswd, $db)) {
    error_log("Connection failed.\n");
    exit;
  }

  ////////////////////////////////// prepare
  (isset($_POST['id']) && !empty($_POST['id'])) ? $id=$_POST['id']:returnError("Error");
  _pregMatch($id);
  $queryA = "SELECT count(*) FROM sys_track where id = ?";
  $stmtA = $conn->stmt_init();
  $stmtA->prepare($queryA);
  $stmtA->bind_param("s",$id);
  $stmtA->execute();
  $stmtA->store_result();
  $stmtA->bind_result($row0);
  while ($stmtA->fetch()) {
        $phenoid = $row0;
  }
  echo $phenoid;
?>

