Browse files

modify_database function change - if no ; in single line sql strings,…

… add it
  • Loading branch information...
1 parent e3da276 commit 1e47ecd5d9fd7a00590d7f824ff5d63a8eea3b44 mjollnir_ committed Nov 22, 2004
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/datalib.php
View
4 lib/datalib.php
@@ -88,6 +88,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;
}

0 comments on commit 1e47ecd

Please sign in to comment.