<?php

  require '../conf/config.php';

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

  ////////////////////////////////// prepare
  $str = "";
  $query = "select phenotype_id,phenotype from sys_phenotype";
  $stmtN = $conn->stmt_init();
  $stmtN->prepare($query);
  $stmtN->execute();
  $stmtN->store_result();
  $stmtN->bind_result($row0,$row1);
  while ($stmtN->fetch()) {
	$str .= $row0.",".$row1."|";
  }
  $stmtN->close();
  $str = rtrim($str, '|');
  
  echo $str;
?>

