Database active record/ORM
Permalink
Coming from CodeIgniter and wanting to build with Laravel, I'm missing a real database library/active record thingy. I'm specifically looking for some active record sort of thing for Zend/Concrete5. Meaning I can send an array to this "thing", with keys as columns of the database and the values of each key is the actual value that needs to be stored in the database. I.e.:
$data = array(
'name' => 'test',
'other_data' => 'Some more text <strong>WITH html</strong>
);
$this->db->insert($data, 'table_name');
So everything will get escaped without me doing anything. I don't want to repeat logic in my controllers, and someone must have actually build something like this, right? Also if I want to select some entries with multiple where conditions, this should be possible... Like so:
$this->db->where('name', 'test')->where('other_data', 'some other value I want to check also')->limit(2)->result();
Well, you catch the drift. Pretty straight forward. Any library that will help me from writing too much code that can be done by one single library, will help me... But anything like this above is AWESOME.
http://ellislab.com/codeigniter/user-guide/database/active_record.h...
$data = array(
'name' => 'test',
'other_data' => 'Some more text <strong>WITH html</strong>
);
$this->db->insert($data, 'table_name');
So everything will get escaped without me doing anything. I don't want to repeat logic in my controllers, and someone must have actually build something like this, right? Also if I want to select some entries with multiple where conditions, this should be possible... Like so:
$this->db->where('name', 'test')->where('other_data', 'some other value I want to check also')->limit(2)->result();
Well, you catch the drift. Pretty straight forward. Any library that will help me from writing too much code that can be done by one single library, will help me... But anything like this above is AWESOME.
http://ellislab.com/codeigniter/user-guide/database/active_record.h...