Merged from MOODLE_14_STABLE: modify_database function change - if no ; in single line sql strings, add it

This commit is contained in:
mjollnir_
2004-11-22 04:11:07 +00:00
parent 01669f1619
commit a967637614
+4
View File
@@ -123,6 +123,10 @@ function modify_database($sqlfile='', $sqlstring='') {
$lines = file($sqlfile);
}
} else {
$sqlstring = trim($sqlstring);
if ($sqlstring{strlen($sqlstring)-1} != ";") {
$sqlstring .= ";"; // add it in if it's not there.
}
$lines[] = $sqlstring;
}