<?
include "connect_mysql.php";

//$nth = "ผู้ดูแลระบบ";
//$lnth = "ผู้ดูแลระบบ";

$sql_s = "SELECT * FROM user_tb";
$result_s = mysql_query($sql_s) or die(mysql_error());
if (mysql_num_rows($result_s)==0){
$sql = " INSERT INTO  `yongbi_db`.`user_tb` ( ";
$sql .= " `userid` , ";
$sql .= " `usercode` , ";
$sql .= " `usernameth` , ";
$sql .= " `userlnameth` , ";
$sql .= " `usernameen` , ";
$sql .= " `userlnameen` , ";
$sql .= " `usersex` , ";
$sql .= " `userposition` , ";
$sql .= " `userdepartment` , ";
$sql .= " `usercompany` , ";
$sql .= " `userbranch` , ";
$sql .= " `userloginname` , ";
$sql .= " `userpassword` , ";
$sql .= " `userpin` , ";
$sql .= " `userpicpath` , ";
$sql .= " `createby` , ";
$sql .= " `createtime` , ";
$sql .= " `updateby` , ";
$sql .= " `updatetime` , ";
$sql .= " `statustrans` , ";
$sql .= " `statonline` , ";
$sql .= " `lasttimeonline` , ";
$sql .= " `remark` ";
$sql .= " ) ";
$sql .= " VALUES (
'',  'AYG0001',  'ผู้ดูแลระบบ',  'ผู้ดูแลระบบ',  'Admin',  'Admin',  'M',  0,  0, 0, 0,  'Admin',  'Admin1234',  '123456',  '-',  'Admin',  NOW(),  'Admin',  NOW(), 'N', 'N', NOW(), '-'
); ";
$result = mysql_query($sql) or die(mysql_error());	
}	



mysql_close($c);
?>