Jump to content


the_coders

Member Since 21 Jul 2017
Offline Last Active Jul 29 2017 06:53 AM
-----

Posts I've Made

In Topic: now showing data using if using variabel $crud->where()

22 July 2017 - 04:39 AM

im really sorry im confused for that solution im tried  but still not working :( can you give me a simple  code example please i need help because im stuck almost 2 days

 

Thank you for your help


In Topic: now showing data using if using variabel $crud->where()

22 July 2017 - 02:37 AM

thank you for your advice, i already try using session but the result is still same, just for refrence my case / flow is just like below 

 

 

         (step 1)                                      (step 2)                                                           (step 3)

user choose category => web direct to other page => user can manage the page related to category that the user choosed ( in same category)

 

 

and the code below using session that you tell me :

 

//===============================================

 

// receive id from step one and get list of data from id step 1

 

$package = array(
'id_category' => $this->input->post('select_category')  // id from (step 1)
);
 
$crud->setTable('layer2_inv_correlation');
$crud->setSubject('Investor Correlation', 'Investor Correlation');
 
$crud->where(['layer2_inv_correlation.fk_layer2_categoryid' => $this->session->userdata('id_category') ]); 
 
$crud->setRelation('fk_layer2_categoryid','layer2_inv_question','inv_question');
$crud->setRelation('fk_layer2_subcategoryid','layer2_inv_answer','answer_name');

.

.

.

---

 

//==============================================

 

and the result still same no data on the list  , even when i open the page in the first time, there is no data show up

 

result expectations

 

after i choose the category (step 1) => i can  get list of data related to the  category that i choosed in ( step 1)

 

is there another way to fix that ?

 

thank you for your help :)