<?php
session_start();
$q = strtolower($_GET["q"]);
include '../db_connect.php';
 include '../db_table_select.php';
$cmp=$_SESSION[SESS_CMPC];
$fny=$_SESSION[SESS_FNY];

//$items = mysqli_query($con,"Select billno, pedtotal from billreg where billto = '$_GET[comcode]' and cmp = 'IS' and fny = '12-13' and billno not in (select billno from vchdetails)");

$items = mysqli_query($con,"Select bookid,tamount,tottime,totkm,exhr,exkm from $bookingreg where vendor = '$_GET[comcode]' and cmp = '$_SESSION[SESS_CMPC]' and fny = '$_SESSION[SESS_FNY]' and bookid not in (select billno from vchdetails)");

//while($row = mysqli_fetch_array($items))
 // {
 // echo $row['value'];
 
//  }

while($row = mysqli_fetch_array($items)) {
//	if (strpos(strtolower($row['bookid']), $q) !== false) {
		echo "$row[bookid]|$row[tamount]|$row[tottime]|$row[totkm]|$row[exhr]|$row[exkm]\n";
//}
}
mysqli_close($con);


?>