CodeIgniter-ActiveRecord /

Filename Size Date modified Message
20.3 KB
464 B

CodeIgniter Style ActiveRecord

Works with CodeIgniter v1.7 only. Needs a bit of hacking to get it to work with CI 2.0

<?php

$me = $this->Person->find_by_first_name('Buddy');
$me->fetch_related_pages();

$new_page = new Page();
$new_page->title = 'My Title';
$new_page->content = 'Blah blah blah';
$new_page->save();

$me->create_relationship($new_page); 
?>

More to come soon...