Check out the LimeSurvey source code on GitHub!
Welcome, Guest
Username: Password:

TOPIC: output value LS database

output value LS database 2 years 11 months ago #102536

  • RoMaier
  • RoMaier's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 12
  • Karma: 0

I hope you can help me, I'm already despair :( How can I access the LS database, and let me spend a value with a script?
I tried it this way:

include "mysql_ls.php"; //the conection to database works!//


$query = "SELECT 71744X7X30 FROM lime_survey_71744 WHERE id = $id";
$result = mysql_query($query);
if (!$result) {include ("error.php"); die("DATABASE ERROR: ".mysql_error());}
while($row = mysql_fetch_object($result))
{$byear = $row->71744X3X30;}


But the problem is that PHP not accepted the SGQA on the line "{$byear = $row->71744X3X30;}". I think because the variable name starts with a number.
Alternatively, the idea was to pass the required variables into a new database and rename it, such as:


However, I can only pass 4 variables at the end URL, but consumes 32 variables. Can I extend the End_URL field? Or can I output values in any other way?

Many Thanks!
The administrator has disabled public write access.

output value LS database 2 years 11 months ago #102648

  • Marksom
  • Marksom's Avatar
  • Offline
  • Junior Lime
  • Posts: 20
  • Karma: 0
For me PHP usually accept a call to the mysql database.
PHP 5.4
mysql 5.5.2
mysql_select_db($db, $show);	
$query = "SELECT $name FROM lime_survey_$code";
$result = mysql_query($query, $show) or die(mysql_error());

Can your PHP version, but try to turn it into a first variable.
Hope this helps
Last Edit: 2 years 11 months ago by Marksom.
The administrator has disabled public write access.
Time to create page: 0.865 seconds
Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form