1 installation + 2 databases

More
3 years 1 week ago #114194 by rem_hopster
rem_hopster created the topic: 1 installation + 2 databases
Hello Everyone,

Is it possible to have one installation of LS and on two databases and export two surveys eachs to one of the databases
I have an idea I want to explore


Thanks

Rem

Please Log in to join the conversation.

More
3 years 1 week ago #114195 by Mazi
Mazi replied the topic: 1 installation + 2 databases
To my knowledge this isn't possible.

The only solution I can think of, but that depends on your plans, is to clone the DB after installation and then use triggers to check for changes and adjust the second DB accordingly.


Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com'"

Please Log in to join the conversation.

More
3 years 1 week ago #114214 by DenisChenu
DenisChenu replied the topic: 1 installation + 2 databases

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in to join the conversation.

More
3 years 1 week ago #114219 by rem_hopster
rem_hopster replied the topic: 1 installation + 2 databases
Hello everyone

The solution to make it possible I was thinking about is:

Write script voor admin backend:
If survey id="xxxxxx" use config.php with the database
If survey id="yyyyyy" use config2.php to connect to the other database

But this isn't a very clean solution...

Are there other ideas to make this possible?

thanks

Please Log in to join the conversation.

More
3 years 1 week ago #114223 by DenisChenu
DenisChenu replied the topic: 1 installation + 2 databases

rem_hopster wrote: Are there other ideas to make this possible?

Different config.php depending of some server var.

Quick:
<?php
if($_SERVER['SERVER_NAME'] == 'ls1.example.org'){
$aConfig=array( ....);
}else{
$aConfig=array( ....);
}
return $aConfig;

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in to join the conversation.

More
3 years 1 week ago #114232 by rem_hopster
rem_hopster replied the topic: 1 installation + 2 databases
<?php
if($_SERVER == 'ls1.example.org'){
$aConfig=array( ....);
}else{
$aConfig=array( ....);
}
return $aConfig;

This script could work...But I would like to make it more when the survey is selected

If survey_id == '121221' {
....
}

Would like to have a check box or something like that and than select the database

I know that some other users on the university also would like this.

Please Log in to join the conversation.

More
3 years 1 week ago #114256 by DenisChenu
DenisChenu replied the topic: 1 installation + 2 databases
HI,

I really don't understand why you need this .....

BUT (maybe)
$iGetId=(isset($_GET('sid')) ? $_GET('sid') : NULL;
$iPostId=(isset($_POST('sid')) ? $_POST('sid') : NULL;
$iFinalId= ($iGetId ) ? $iGetId : $iPostId ;
 
if($iFinalId=='121221'){
 
}else{
 
}

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .
The following user(s) said Thank You: rem_hopster

Please Log in to join the conversation.

More
3 years 1 week ago #114294 by rem_hopster
rem_hopster replied the topic: 1 installation + 2 databases
Will work this out Denis
Thanks!

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!