Welcome Guest, Not a member yet? Register   Sign In
Returning Inserted Primary ID
#7

[eluser]ryeguy[/eluser]
[quote author="whobutsb" date="1229047788"]Hmm Am I using this method the correct way?

It doesn't seem to be returning the Inserted ID.

Code:
$data = array('contactID' => $contactID, 'fieldcategoryID' => $fieldcategoryID, 'field_name'=>$fieldname, 'field_value'=>$fieldvalue);
        $add = $this->db->insert_string('tblContactDetails', $data);
        $contactdetailsID = $this->db->insert_id();
[/quote]

No this wasn't a bug, what insert_string does is create a insert query string. It doesn't actually perform any database interaction.


Messages In This Thread
Returning Inserted Primary ID - by El Forum - 12-11-2008, 01:34 PM
Returning Inserted Primary ID - by El Forum - 12-11-2008, 01:56 PM
Returning Inserted Primary ID - by El Forum - 12-11-2008, 01:58 PM
Returning Inserted Primary ID - by El Forum - 12-11-2008, 02:09 PM
Returning Inserted Primary ID - by El Forum - 12-11-2008, 02:33 PM
Returning Inserted Primary ID - by El Forum - 12-11-2008, 02:46 PM
Returning Inserted Primary ID - by El Forum - 12-11-2008, 09:46 PM
Returning Inserted Primary ID - by El Forum - 12-11-2008, 10:05 PM



Theme © iAndrew 2016 - Forum software by © MyBB