Welcome Guest, Not a member yet? Register   Sign In
Duplicate Entry DB error (any clues)?
#2

[eluser]Hakkam[/eluser]
Do you want update an EmployeID ( Primary Key ) ??? If so, you need put the original EmployeeID in other input type form and than, use this in Where condition in SQL.

Example.

In Form Views ...
Employee ID Orig: --> maybe hidden
your orig ID
Employee ID:
micjac
Department ID:
5551
First Name:
michael
Last Name:
jackson
click update button

In controller :

function update_emp()
{
$this->load->database();

$this->db->set('employeeID',$_POST['employeeID']);
$this->db->where('employeeID',$_POST['employeeID_orig']);
$this->db->update('tblemployee');


Messages In This Thread
Duplicate Entry DB error (any clues)? - by El Forum - 07-16-2009, 12:16 AM
Duplicate Entry DB error (any clues)? - by El Forum - 07-16-2009, 01:24 AM
Duplicate Entry DB error (any clues)? - by El Forum - 07-16-2009, 01:41 AM
Duplicate Entry DB error (any clues)? - by El Forum - 07-16-2009, 01:50 AM
Duplicate Entry DB error (any clues)? - by El Forum - 07-16-2009, 02:06 AM
Duplicate Entry DB error (any clues)? - by El Forum - 07-16-2009, 02:24 AM
Duplicate Entry DB error (any clues)? - by El Forum - 07-16-2009, 02:34 AM



Theme © iAndrew 2016 - Forum software by © MyBB