Welcome Guest, Not a member yet? Register   Sign In
ActiveRecord for CodeIgniter: Rails-style model interactions
#54

[eluser]ralf57[/eluser]
[quote author="chromice" date="1194806081"]But frankly, I did not get what the problem you are referring to, is all about. Could you elaborate further?[/quote]

I thought i had it explained quite clear.
Anyway it's not a problem:
provided an array to insert (create a new row in the DB table)
Code:
$data = array(
    'title' => 'My title' ,
    'name' => 'My Name' ,
    'date' => 'My date'
);
and a table with three columns
Code:
title , name, date
to get the desired result (insert each value in the right column), does the above array must already be in the right order or it can be in any order ex:
Code:
$data = array(
    'date' => 'My date' ,
    'name' => 'My Name' ,
    'title' => 'My title'
);
and the Activerecord class automatically puts the values in the right columns?
Hope i was clearer now...


Messages In This Thread
ActiveRecord for CodeIgniter: Rails-style model interactions - by El Forum - 11-11-2007, 08:41 AM



Theme © iAndrew 2016 - Forum software by © MyBB