Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change database #9

Open
MENDELKAHAN opened this issue Jul 6, 2020 · 1 comment
Open

change database #9

MENDELKAHAN opened this issue Jul 6, 2020 · 1 comment

Comments

@MENDELKAHAN
Copy link

Hi this is a great user system, I am trying to implement a system when the users are on one database and when the user logs in the part of the information will be where the rest of the data is stored

//something like this
protected function setUser()
{
$account = $this->CI->db->get_where("accounts", array("id" => $this->user->account_id))->row(0);
$_SESSION['db_name'] = $account;
var_dump($_SESSION['db_name']);

    die();

.....................
return true;
}

the var_dump give this

object(stdClass)#27 (6) { ["id"]=> string(1) "1" ["company"]=> string(10) "management" ["database"]=> string(21) "management_qpuv0o2y3r" ["user_limit"]=> string(1) "1" ["created_at"]=> NULL ["updated_at"]=> NULL }

@MENDELKAHAN
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant