Inconsistent datatype of employee_id

Technical Information on MySQL database

Moderator: Admin

Inconsistent datatype of employee_id

Postby drupalama » Thu Dec 08, 2011 4:46 pm

hi, it's confusing me that the "employee_id" field has many different datatypes across OrangeHRM tables. i am integrating a proximity badge system and was going to use the employee_id field for my key. but in [hs_hr_employee] table the field employee_id is varchar(50) but in [ohrm_attendance_record] table it is bigint(20)

what is the reason for this inconsistency?
drupalama
 
Posts: 1
Joined: Thu Dec 08, 2011 4:39 pm

Re: Inconsistent datatype of employee_id

Postby Gayanath » Sun Feb 19, 2012 10:16 am

You should use `emp_number` in `hs_hr_employee`. It's the primary key. All other tables refer to this (even though in those tables it's called as `employee_id`). `employee_id` in `hs_hr_employee` refers to the Employee Code that can be filled in PIM module. It's bit confusing actually.
Gayanath
 
Posts: 111
Joined: Fri Aug 01, 2008 11:05 am


Return to MySQL

Who is online

Users browsing this forum: No registered users and 2 guests