Jump to content


Srowako

Member Since 08 Aug 2012
Offline Last Active Nov 08 2012 07:38 AM
-----

Posts I've Made

In Topic: set relation n-n

30 October 2012 - 02:04 PM

Dear sobari26,

Check this,

Posted Image
BIDANGPROGRAMSTUDI -> add field priority INT(11) and no primary_id = film_actor
BIDANGJABATANDIBUKA.ID_BID = BIDANGPROGRAMSTUDI.ID_BIDANG <- is relation
PROGRAMSTUDI = actor
BIDANGJABATANDIBUKA = film
$crud->set_relation_n_n('jabatan_studies', 'BIDANGPROGRAMSTUDI','PROGRAMSTUDI','ID_BIDANG','ID_REKRUTMEN','NAMA_PS','priority');

Semoga bermanfaat.

In Topic: display only date

30 October 2012 - 01:32 PM

Dear amipax,
I am trying to help your Question
try this code ex:

$crud->change_field_type('employee_datebirth','date');
or
$crud->change_field_type('my_date','date');

Documentation

In Topic: change the delete function to update x_status=0

30 October 2012 - 01:15 PM

Nice Code ..... !! B)
if($this->input->get('delete')){
$delete_status_update = array(
"status" => 9,
"user_delete" => $this->dx_auth->get_user_id(),
"time_delete" => date('Y-m-d H:i:s')
 );
 $this->db->update('aap_qt',$delete_status_update,array('id' => $this->input->get('delete')));
}

$crud->add_action('Delete', '', '','ui-icon-minus',array($this,'delete_status_row'));


function delete_status_row($primary_key, $row){
return site_url('quotations/index/').'?delete='.$row->id;
}

Thanks Victor, it's working. :wub: