Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

1 installation + 2 databases

  • rem_hopster
  • rem_hopster's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 4 months ago #114194 by rem_hopster
1 installation + 2 databases was created by rem_hopster
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
The topic has been locked.
  • Mazi
  • Mazi's Avatar
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
9 years 4 months ago #114195 by Mazi
Replied by Mazi on 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
Need Help? We offer professional Limesurvey support: survey-consulting.com
Contact: marcel.minke(at)survey-consulting.com
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
9 years 4 months ago #114214 by DenisChenu
Replied by DenisChenu on 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 , plugin development .
I don't answer to private message.
The topic has been locked.
  • rem_hopster
  • rem_hopster's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 4 months ago #114219 by rem_hopster
Replied by rem_hopster on 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
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
9 years 4 months ago #114223 by DenisChenu
Replied by DenisChenu on 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:
Code:
<?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 , plugin development .
I don't answer to private message.
The topic has been locked.
  • rem_hopster
  • rem_hopster's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 4 months ago #114232 by rem_hopster
Replied by rem_hopster on 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.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
9 years 4 months ago #114256 by DenisChenu
Replied by DenisChenu on topic 1 installation + 2 databases
HI,

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

BUT (maybe)
Code:
$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 , plugin development .
I don't answer to private message.
The following user(s) said Thank You: rem_hopster
The topic has been locked.
  • rem_hopster
  • rem_hopster's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 4 months ago #114294 by rem_hopster
Replied by rem_hopster on topic 1 installation + 2 databases
Will work this out Denis
Thanks!
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose