Welcome Guest, Not a member yet? Register   Sign In
Stuffing array into active record insert
#1

[eluser]stevefink[/eluser]
Hi all,

I was just curious, is there a reason an Array with multiple elements is not properly being inserted using $this->db->insert with the Active Record class? Here's what my Array looks like:

Code:
DEBUG - 2007-11-05 11:20:32 --> testing for $p: Array
(
    [0] => Array
        (
            [first_name] => Steve
        )

    [1] => Array
        (
            [middle_initial] => S
        )

    [2] => Array
        (
            [last_name] => Finkelstein
        )

    [3] => Array
        (
            [room_number] => 301
        )

    [4] => Array
        (
            [cpt_id] => 1
        )

)

And my PHP:

Code:
function insert_patient($p) {
        log_message('debug', "testing for \$p: ".print_r($p, TRUE));
        $this->db->insert('ms_patients', $p);
    }

Thanks for any hints.. :-)


Messages In This Thread
Stuffing array into active record insert - by El Forum - 11-05-2007, 10:25 AM
Stuffing array into active record insert - by El Forum - 11-05-2007, 11:13 AM
Stuffing array into active record insert - by El Forum - 11-05-2007, 11:58 AM
Stuffing array into active record insert - by El Forum - 11-05-2007, 12:17 PM



Theme © iAndrew 2016 - Forum software by © MyBB