From 64da83c6ccae839325523dddb3fe305ae9ef8707 Mon Sep 17 00:00:00 2001 From: agrabs Date: Wed, 30 Apr 2008 18:38:24 +0000 Subject: [PATCH] changed the sql-statement "CONCAT..." with the abstract SQL-build-funtion sql_concat() --- mod/feedback/db/upgrade.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/mod/feedback/db/upgrade.php b/mod/feedback/db/upgrade.php index f26def940f0..b37dc83c26b 100644 --- a/mod/feedback/db/upgrade.php +++ b/mod/feedback/db/upgrade.php @@ -152,9 +152,14 @@ function xmldb_feedback_upgrade($oldversion=0) { if ($result && $oldversion < 2008042401) { //New version in version.php if($result) { - $update_sql1 = "UPDATE ".$CFG->prefix."feedback_item SET presentation = CONCAT('r>>>>>',presentation) WHERE typ IN('radio','radiorated')"; - $update_sql2 = "UPDATE ".$CFG->prefix."feedback_item SET presentation = CONCAT('d>>>>>',presentation) WHERE typ IN('dropdown','dropdownrated')"; - $update_sql3 = "UPDATE ".$CFG->prefix."feedback_item SET presentation = CONCAT('c>>>>>',presentation) WHERE typ = 'check'"; + $concat_radio = sql_concat("'r>>>>>'",'presentation'); + $concat_check = sql_concat("'d>>>>>'",'presentation'); + $concat_dropdown = sql_concat("'c>>>>>'",'presentation'); + + $update_sql1 = "UPDATE ".$CFG->prefix."feedback_item SET presentation = ".$concat_radio." WHERE typ IN('radio','radiorated')"; + $update_sql2 = "UPDATE ".$CFG->prefix."feedback_item SET presentation = ".$concat_dropdown." WHERE typ IN('dropdown','dropdownrated')"; + $update_sql3 = "UPDATE ".$CFG->prefix."feedback_item SET presentation = ".$concat_check." WHERE typ = 'check'"; + $result = $result && execute_sql($update_sql1); $result = $result && execute_sql($update_sql2); $result = $result && execute_sql($update_sql3);