Welcome Guest, Not a member yet? Register   Sign In
Flaming-Crud: Another CRUD Generator
#5

[eluser]clip[/eluser]
I have just commit v0.1.3 to github. Added the ability to call multiple table joins. Example below.
Code:
$this->load->model('posts_model');
$post = new $this->posts_model();
$post->order_by = 'post_date DESC';

//array('table_to_be_joined'=>array('main_table_field', 'join_table_field', 'join_type'))

//if the join_type is omitted the default is a LEFT join

//you can also do multiple joins as you can see in this example

$post->join = array('categories'=>array('cat_id', 'id', 'LEFT'),
                    'users'=>array('author_id', 'id')
                    );

$posts = $post->get();

Get the new version from here.


Messages In This Thread
Flaming-Crud: Another CRUD Generator - by El Forum - 10-29-2009, 11:38 PM
Flaming-Crud: Another CRUD Generator - by El Forum - 10-30-2009, 04:12 AM
Flaming-Crud: Another CRUD Generator - by El Forum - 10-30-2009, 09:21 PM
Flaming-Crud: Another CRUD Generator - by El Forum - 11-01-2009, 10:25 PM
Flaming-Crud: Another CRUD Generator - by El Forum - 11-03-2009, 07:20 PM
Flaming-Crud: Another CRUD Generator - by El Forum - 11-05-2009, 02:09 PM
Flaming-Crud: Another CRUD Generator - by El Forum - 11-11-2009, 07:09 PM



Theme © iAndrew 2016 - Forum software by © MyBB