<?php include "configuration.inc.php";?>
<?php

if ( !isset($_REQUEST['term']) )
    exit;
$rs = mysql_query('select * from  view_job_schedule where app_name like "'. mysql_real_escape_string($_REQUEST['term']) .'%" or app_id like "'. mysql_real_escape_string($_REQUEST['term']) .'%" order by app_id asc');

$data = array();

if ( $rs && mysql_num_rows($rs) )
{

$data[] = array(
            'label' =>'<table border="0" cellpadding="2" cellspacing="1" style="width:100%">
			<tr style="color:#fff;"><td style="background:#336666">Id</td><td style="background:#336666">Applicant Name</td></tr></table> ' ,'value' => ''
           
        ); 
			
    while( $row = mysql_fetch_array($rs, MYSQL_ASSOC) )
    {
	$index=$row['app_id'];
    $data[] = array(
            'label' =>'<table border="0" cellpadding="2" cellspacing="1"  style="width:100%"><tr><td>'. $row['app_id'] .'</td><td>'. $row['app_name'] .'</td></tr></table> ' ,
            'value' => $row['app_name'],
			'id' => $index,
			'job_title_id' =>$row['job_title_id']
			
        );
    }
	
}

echo json_encode($data);
flush();

?>