[eluser]solid9[/eluser]
Hi guys
I created a table named 'swap'
It has fields namely,
swap_id,
seeking,
and offering.
I have this codes below that will insert the data into "swap" table.
Code:
$data = array(
'offering' => $offer,
'seeking' => $seek
);
$this->db->insert('swap', $data);
Lets assume the data is inserted properly.
Now how do I fetch the swap_id from "swap" table,
after inserting the data?
I can use select and use $offer as the condition for WHERE.
But I think there is a easier and better way to get the "swap_id"?
Thanks in advanced.