⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

Small problem



Tomislav
  • profile picture
  • Member

Posted 17 November 2013 - 12:19 PM

Hi, 

 

i have 2 tables account and user.

 

account

 

account_ID

user_ID_FK

acc_name

acc_type

 

user

user_ID

email

name

 

I want to display acc_name and acc_type without user_ID_FK and insert/edit user_ID_FK ,acc_name, acc_type.

 

user_ID_FK i get from function get_users_data();

 

How can i accomplish inserting user_ID_FK without displaying to user.

 

Here is my currently code:

 

 

 public function account()
    {
        $user_id = $this->main->get_users_data();
        $crud = new grocery_CRUD();
        $crud->where('user_ID_FK', $user_id['user_ID']);
        $crud->set_table('account);
        $crud->fields('acc_name', 'acc_type');
        $output = $crud->render();
        $this->_example_output($output);    
    }

 

Thanks, Tomislav