Welcome Guest, Not a member yet? Register   Sign In
Primary Key question
#1

[eluser]codelearn[/eluser]
Hi guys,

Is there a way to use the "insert" function of active record, and then retrieve the "id" column immediately following creation.

Example:

$this->db->set('tagline',$this->input->post('tagline'));
$this->db->insert('group_group');

Now I want the ID of the row I just created... without using the tagline/where statement.

Thanks!


Messages In This Thread
Primary Key question - by El Forum - 02-25-2009, 12:47 PM
Primary Key question - by El Forum - 02-25-2009, 01:03 PM
Primary Key question - by El Forum - 02-25-2009, 01:10 PM
Primary Key question - by El Forum - 02-25-2009, 01:12 PM
Primary Key question - by El Forum - 02-25-2009, 01:13 PM



Theme © iAndrew 2016 - Forum software by © MyBB