PDA

View Full Version : MySQL, Inserting Twice



leguvan
04-14-2008, 01:22 PM
I have this code....


$idata = array(
'user_id' => $this->session->userdata('user_id') ,
'time_entry' => time() ,
'in_out' => 1
);

$this->db->insert('time_clock', $idata);

But sometimes the code will insert the data twice... This exact code has worked in other applications without this happening, any one else getting this kind of thing or any one know a fix I could try?

ssgc
04-14-2008, 01:39 PM
sometimes the code will insert the data twice..

Is it due to impatient users clicking submit twice?

-

leguvan
04-14-2008, 01:42 PM
No, because it has happened to me, I was trying to test that theory and thats not it.