Jump to content


jinbatsu

Member Since 12 Dec 2013
Offline Last Active Aug 12 2018 09:01 PM
-----

#12123 set_relation_n_n get values from relation table

Posted jinbatsu on 29 January 2015 - 11:19 AM

In the sample it show the fullname, NOT the priority.
 
$crud->set_relation_n_n('actors', 'film_actor', 'actor', 'film_id', 'actor_id', 'fullname','priority');
 
If you want to add where, you should do like this:
 
$where = "actor_id = 1"; 
$crud->set_relation_n_n('actors', 'film_actor', 'actor', 'film_id', 'actor_id', 'fullname','priority', $where);

So, where condition is in the 8 position, not in the 7.

6 position is for display name

7 position is for priority (field name for sorting order ASC).

8 position is for where condition.

 




#10500 For loop in dropdown - grocery crud

Posted jinbatsu on 09 January 2014 - 02:47 PM

<?php
for($i=5000; $i<=500000; $i=$i+5000) {
	$list_arr[$i] = $i . ' passed';
}
$crud->field_type('for_loop','dropdown', $list_arr);
?>



#10379 How to modify selectbox

Posted jinbatsu on 18 December 2013 - 02:29 PM

Hello,

 

Like this:

$crud->field_type('member_type','dropdown', array('u' => 'user, 's' => 'student'));

http://www.grocerycr...#dropdown-field




#10356 passing controller

Posted jinbatsu on 15 December 2013 - 04:03 PM

In your Controller:


//....
$rows_from_db = ''; // your object query result sql
$data['rows'] = $rows_from_db;
$this->load->view('default_view', $data);


In your View:

<ul class="nav nav-tabs">
<?php foreach ($rows as $row) { ?>
    <li><a href="<?php echo site_url('faculty/main/mainlist/edit/'.$row->id)?>"><?php echo $row->title; ?></a></li>
<?php } ?>
</ul>



#10344 Codeigniter Simplicity - A template library that it will make your code... si...

Posted jinbatsu on 14 December 2013 - 06:39 AM

Thank You for the explain, I understand and it works well with grocerycrud.

But, it doesn't work with image CRUD, I have try with default output also I try with section, but doesn't show anything, it's blank and undefined variable output.

 

Can this template use for image crud?

Thank You

 

EDIT: SOLVED

 

I have forget to add extra segment, because my image_crud use category, and I should use category ID in my url browser.