Welcome Guest, Not a member yet? Register   Sign In
CRUD with Ci 1.7
#10

[eluser]Colin Williams[/eluser]
Is that seriously a library, umefarooq? Looks eerily familiar....

Code:
$data = array('name'=>$name,'description'=>$desc);
$this->crud->setRecord('test',$data);

// Same as

$data = array('name'=>$name,'description'=>$desc);
$this->db->insert('test', $data);

Code:
$this->crud->updateRecord('test',$data,array('id'=>$id));

// Same as

$this->db->update('test', $data, array('id'=>$id));

Code:
$this->crud->deleteRecord('test',array('id'=>$id));

// Same as

$this->db->delete('test', array('id'=>$id));

Code:
$row = $this->crud->getRecord('test',array('id'=>$id));

// Same as

$row = $this->db->get_where('test', array('id'=>$id))->row();

... See where I'm getting at. It provides no new functionality! It's just a more verbose version of ActiveRecord. I can't believe someone really wrote that...

And...

Quote:i use common table name for example, in same controller you can use multiple tables also for that no need to set every time table name its better to pass to specific function.

The controller should have absolutely no clue how or where data is stored (it just knows that the model does it). This is the whole point of models.


Messages In This Thread
CRUD with Ci 1.7 - by El Forum - 01-29-2009, 07:35 PM
CRUD with Ci 1.7 - by El Forum - 01-30-2009, 01:15 AM
CRUD with Ci 1.7 - by El Forum - 01-30-2009, 05:21 AM
CRUD with Ci 1.7 - by El Forum - 02-11-2009, 07:56 PM
CRUD with Ci 1.7 - by El Forum - 02-12-2009, 12:35 AM
CRUD with Ci 1.7 - by El Forum - 02-13-2009, 02:15 AM
CRUD with Ci 1.7 - by El Forum - 02-13-2009, 02:55 AM
CRUD with Ci 1.7 - by El Forum - 02-13-2009, 11:32 AM
CRUD with Ci 1.7 - by El Forum - 02-14-2009, 04:46 AM
CRUD with Ci 1.7 - by El Forum - 02-14-2009, 04:58 AM
CRUD with Ci 1.7 - by El Forum - 02-14-2009, 11:27 AM
CRUD with Ci 1.7 - by El Forum - 02-14-2009, 12:00 PM
CRUD with Ci 1.7 - by El Forum - 02-14-2009, 12:51 PM
CRUD with Ci 1.7 - by El Forum - 02-14-2009, 12:59 PM
CRUD with Ci 1.7 - by El Forum - 02-14-2009, 01:02 PM
CRUD with Ci 1.7 - by El Forum - 02-14-2009, 01:06 PM
CRUD with Ci 1.7 - by El Forum - 02-14-2009, 01:14 PM
CRUD with Ci 1.7 - by El Forum - 02-14-2009, 01:45 PM
CRUD with Ci 1.7 - by El Forum - 02-14-2009, 02:55 PM
CRUD with Ci 1.7 - by El Forum - 02-14-2009, 02:58 PM
CRUD with Ci 1.7 - by El Forum - 02-14-2009, 03:06 PM
CRUD with Ci 1.7 - by El Forum - 02-14-2009, 03:09 PM
CRUD with Ci 1.7 - by El Forum - 02-14-2009, 04:52 PM
CRUD with Ci 1.7 - by El Forum - 02-24-2009, 08:45 AM



Theme © iAndrew 2016 - Forum software by © MyBB