Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

… add it
  • Loading branch information...
commit 1e47ecd5d9fd7a00590d7f824ff5d63a8eea3b44 1 parent e3da276
mjollnir_ authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/datalib.php
4 lib/datalib.php
View
@@ -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;
}
Please sign in to comment.
Something went wrong with that request. Please try again.