12-01-2010, 12:02 PM
[eluser]cpass78[/eluser]
Hello,
I have a need to connect to many databases from a form to check if certain tables exist. There could potentially be hundreds of DB's and the names are not known yet. I'd need to connect to one based on value.
Is there any way to do this without messing with the database.php config file? My username password and host would all remain the same just the db would need to change.
I did try
and it always returns false, but the post vale is correct.
Thank you!
Hello,
I have a need to connect to many databases from a form to check if certain tables exist. There could potentially be hundreds of DB's and the names are not known yet. I'd need to connect to one based on
Code:
$this->input->post();
Is there any way to do this without messing with the database.php config file? My username password and host would all remain the same just the db would need to change.
I did try
Code:
$config['database'] = "study_".$this->studycode;
if ($this->load->database($config)){
echo "true";
}else{
echo "false";
}
Thank you!