<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
<script>
$(document).ready(function() {
	$('#groupptb').DataTable({
		"dom": 'f', //กำหนดส่วนหัวเอง
		"scrollY": '50vh', //"200px",
  		"scrollCollapse": true,
  		"paging": false
	});

});
</script>
</head>

<body>
	<table id="groupptb" class="display cell-border compact row-border table table-striped table-bordered" cellspacing="0" width="100%">
          <thead>
              <tr>
                  <th>ชื่อกลุ่ม</th>
              </tr>
          </thead>

          <tbody>
         <?
		  	include "../../Connections/connect_mysql.php";
			$sql=" select * from grouprp_tb order by rpID; ";
			$result = mysql_query($sql) or die(mysql_error());
			$rowint = 1;
			while($record=mysql_fetch_array($result)){
				//$emp_id = $record['emp_id'];
				//$emp_begin_name = iconv('tis-620','utf-8',$record['emp_begin_name']);
				$GroupID2 = $record['rpID'];
				$GroupName2 = $record['rpName'];
		 ?>

          	<tr id="r<?=$GroupID2?>" onClick="addgrouptoreportGroup(<?=$GroupID2?>);">
                <td><?=$GroupName2?></td>
            </tr>
         <?
				$rowint = $rowint + 1;
			}//while
		 ?>
          </tbody>
     </table>
</body>
</html>
<?
	mysql_close($c);
?>
