Skip to content

Commit

Permalink
Fixed issue : #05392 column "SID" of relation "lime_surveys" does not…
Browse files Browse the repository at this point in the history
… exist with posgresql

Dev	: remove $ADODB_QUOTE_FIELDNAMES=true;
Dev : new patch for 05367, make the sqlQuery and use Execute. Maybe use a new function for insert/update everywher.

git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey_dev@10704 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
Shnoulle committed Aug 12, 2011
1 parent 8246afd commit db8dbe0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
14 changes: 2 additions & 12 deletions admin/importoldresponses.php
Expand Up @@ -82,15 +82,6 @@
}
elseif (isset($surveyid) && $surveyid && isset($oldtable))
{
/*
* TODO:
* - mysql fit machen
* -- quotes für mysql beachten --> `
* - warnmeldung mehrsprachig
* - testen
*/
// if($databasetype=="postgres")
// {
$activetable = "{$dbprefix}survey_$surveyid";

//Fields we don't want to import
Expand Down Expand Up @@ -118,9 +109,9 @@
$iOldID=$row['id'];
unset($row['id']);

$sInsertSQL=$connect->GetInsertSQL($activetable,$row);
$sInsertSQL="INSERT into {$activetable} (".implode(",",array_map("db_quote_id",array_keys($row))).") VALUES (".implode(",",array_map("db_quoteall",array_values($row))).")";
$result = $connect->Execute($sInsertSQL) or safe_die("Error:<br />$sInsertSQL<br />".$connect->ErrorMsg());
$aSRIDConversions[$iOldID]=$connect->Insert_ID();
$aSRIDConversions[$iOldID]=$connect->Insert_Id($activetable,"id");
}

$_SESSION['flashmessage'] = sprintf($clang->gT("%s old response(s) were successfully imported."),$iRecordCount);
Expand All @@ -144,7 +135,6 @@
{
$row['id']=$aSRIDConversions[$row['id']];
}
else continue;
$sInsertSQL=$connect->GetInsertSQL($sNewTimingsTable,$row);
$result = $connect->Execute($sInsertSQL) or safe_die("Error:<br />$sInsertSQL<br />".$connect->ErrorMsg());
}
Expand Down
1 change: 0 additions & 1 deletion common.php
Expand Up @@ -61,7 +61,6 @@
define('FIREBUG' , $use_firebug_lite);

define('ADODB_ASSOC_CASE', 2); // needed to set proper upper/lower casing for mssql
if (!isset($ADODB_QUOTE_FIELDNAMES)){$ADODB_QUOTE_FIELDNAMES=true;} // needed to select/insert the FieldNames with #

##################################################################################

Expand Down

0 comments on commit db8dbe0

Please sign in to comment.