<?php

require_once($_SERVER['DOCUMENT_ROOT'] . '/sys/db.php');

if (isset($_REQUEST['arg'])) {
  $arg = $_REQUEST['arg'];

  $dal = new DAL();
  $sql = "SELECT id, name, refno FROM project WHERE name LIKE '%$arg%' OR refno LIKE '%$arg%'" ;
  $result = $dal->query($sql);
}
echo json_encode ($result);


