LISTBOX 加上離職人員進去
發表於 : 2014-06-11 16:47:50
$array = $student1->tech_user->Values;
$key1 = $student1->tech_user->GetValue();
$find = 0;
foreach($array as $key => $value){
if($value[0]==$key1){
$find = 1;
}
}
if($find==0){
global $db;
$query = "select * from users where users_id = '$key1' ";
$db->query($query);
$db->next_Record();
$data = $db->f('name');
//echo $key1.$data;
array_push($student1->tech_user->Values,array($key1,$data));
//print_r($student1->tech_user->Values);
//$student1->tech_user->setValue($key1);
}
$key1 = $student1->tech_user->GetValue();
$find = 0;
foreach($array as $key => $value){
if($value[0]==$key1){
$find = 1;
}
}
if($find==0){
global $db;
$query = "select * from users where users_id = '$key1' ";
$db->query($query);
$db->next_Record();
$data = $db->f('name');
//echo $key1.$data;
array_push($student1->tech_user->Values,array($key1,$data));
//print_r($student1->tech_user->Values);
//$student1->tech_user->setValue($key1);
}